Skip to content

Fix trace context in event payload#2205

Merged
antonpirker merged 13 commits intomasterfrom
antonpirker/fix-trace-id2
Jun 28, 2023
Merged

Fix trace context in event payload#2205
antonpirker merged 13 commits intomasterfrom
antonpirker/fix-trace-id2

Conversation

@antonpirker
Copy link
Contributor

@antonpirker antonpirker commented Jun 27, 2023

Make sure that always a trace context is added to the event payload. But also make sure that if there is already a trace context in the event, do not overwrite it. (This used to be the behavior before tracing without performance. See: https://github.com/getsentry/sentry-python/blob/1.25.1/sentry_sdk/scope.py#L420)

Fixes #2201

@antonpirker antonpirker changed the base branch from master to antonpirker/trace-meta-base June 27, 2023 12:42
Base automatically changed from antonpirker/trace-meta-base to master June 28, 2023 08:09
Copy link
Contributor

@sentrivana sentrivana left a comment

Choose a reason for hiding this comment

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

Looks good, please consider the small suggestion and comment

Co-authored-by: Ivana Kellyerova <ivana.kellyerova@sentry.io>
@antonpirker
Copy link
Contributor Author

We also have spans present if tracing is disabled, so the check needs to be there.

@antonpirker
Copy link
Contributor Author

Thanks for the better if, way nicer to read

@antonpirker antonpirker merged commit 6795295 into master Jun 28, 2023
@antonpirker antonpirker deleted the antonpirker/fix-trace-id2 branch June 28, 2023 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TwP] Fallback to propagation context if span is None

2 participants