Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tracing): Only propagate headers from spans within transactions #3070

Merged

Conversation

szokeasaurusrex
Copy link
Member

This change ensures that we only propagate trace headers from spans that are within a transaction. This fixes a bug where any child transactions of a span created outside a transaction are missing a dynamic sampling context and are part of a trace missing a root transaction (because the root is the span).

Fixes #3068

@antonpirker
Copy link
Member

This breaks now a lot of tests because they assume sentry-trace to be there, when there is no transaction it seems...

@szokeasaurusrex szokeasaurusrex changed the title feat(tracing): Only propagate headers from spans within transactions fix(tracing): Only propagate headers from spans within transactions May 15, 2024
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/no-propagation-transactionless-spans branch from e42bac5 to a1d0c76 Compare May 15, 2024 12:52
This change ensures that we only propagate trace headers from spans that are within a transaction. This fixes a bug where any child transactions of a span created outside a transaction are missing a dynamic sampling context and are part of a trace missing a root transaction (because the root is the span).

Also, remove/modify tests that were asserting the old behavior.

Fixes #3068
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/no-propagation-transactionless-spans branch from a1d0c76 to 94a6c2a Compare May 15, 2024 13:01
Copy link
Member

@antonpirker antonpirker left a comment

Choose a reason for hiding this comment

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

lgtm!

@szokeasaurusrex szokeasaurusrex merged commit 94a6c2a into master May 15, 2024
111 checks passed
@szokeasaurusrex szokeasaurusrex deleted the szokeasaurusrex/no-propagation-transactionless-spans branch May 15, 2024 14:01
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.

Dynamic sampling context might be missing from Celery Beat transactions
2 participants