ref(data-collection): Rework DataCollection as a TypedDict, drop accessors by ericapisani · Pull Request #6702 · getsentry/sentry-python · GitHub
Skip to content

ref(data-collection): Rework DataCollection as a TypedDict, drop accessors#6702

Draft
ericapisani wants to merge 1 commit into
ep/db-spec-experiment-foundationfrom
ep/db-spec-experiement-foundation-dict
Draft

ref(data-collection): Rework DataCollection as a TypedDict, drop accessors#6702
ericapisani wants to merge 1 commit into
ep/db-spec-experiment-foundationfrom
ep/db-spec-experiement-foundation-dict

Conversation

@ericapisani

@ericapisani ericapisani commented Jun 30, 2026

Copy link
Copy Markdown
Member

Replace the class-based DataCollection/KeyValueCollectionBehavior/GenAICollection/HttpHeadersCollection API with plain TypedDicts

…ssors

Replace the class-based DataCollection/KeyValueCollectionBehavior/
GenAICollection/HttpHeadersCollection API with plain TypedDicts
(DataCollection, DataCollectionUserOptions, and per-category
*CollectionBehaviour/*UserOptions types) defined in _types.py.

Collection mode strings move from camelCase (denyList/allowList) to
snake_case (deny_list/allow_list) to match Python convention, since
this is a Python-only deviation from the spec that is never
serialized to Sentry.

Drop the should_collect_user_info/should_collect_gen_ai_inputs/
should_collect_gen_ai_outputs accessor methods and their module-level
shortcuts in favor of reading data_collection fields directly, and
drop the public sentry_sdk.DataCollection/GenAICollection/
HttpHeadersCollection/KeyValueCollectionBehavior exports.

Revert the Unreleased CHANGELOG entry and README example for the
prior class-based API.
@github-actions

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant