Skip to content

ref(o11y): Add set_attribute calls in data export tasks#117505

Merged
sentrivana merged 3 commits into
masterfrom
ivana/set-attribute-data-export-tasks
Jun 12, 2026
Merged

ref(o11y): Add set_attribute calls in data export tasks#117505
sentrivana merged 3 commits into
masterfrom
ivana/set-attribute-data-export-tasks

Conversation

@sentrivana

Copy link
Copy Markdown
Contributor

Supplement existing set_tag/set_context/set_extra calls with set_attribute so that data gets added to attributes-based telemetry as well. This will make the migration to span streaming easier.

Related to getsentry/sentry-python#6537

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 12, 2026
Comment thread src/sentry/data_export/tasks.py Outdated
@sentrivana sentrivana marked this pull request as ready for review June 12, 2026 12:09
@sentrivana sentrivana requested a review from a team as a code owner June 12, 2026 12:09
@sentrivana sentrivana requested a review from a team June 12, 2026 12:09
scope.set_extra("export.query", data_export.query_info)
sentry_sdk.set_tag("export.dataset", str(qi.get("dataset")))
sentry_sdk.set_attribute("export.dataset", str(qi.get("dataset")))
sentry_sdk.set_extra("export.query", data_export.query_info)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this extra need to be set as an attribute as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had it there originally but then Warden was complaining about stringifying the query and potentially including user data, so opted to not migrate this one.

@sentrivana sentrivana merged commit a20bdb7 into master Jun 12, 2026
64 checks passed
@sentrivana sentrivana deleted the ivana/set-attribute-data-export-tasks branch June 12, 2026 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants