-
Notifications
You must be signed in to change notification settings - Fork 373
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
Use first valid extracted style for distributed tracing #2879
Use first valid extracted style for distributed tracing #2879
Conversation
This is a change of behavior (users that currently have conflicting propagation headers will see a behavior change IF: they have multiple extraction styles configured and This is unlikely to happen, but not impossible. Given that all other traces behave like this PR, taking the extraction value from the first extraction style that is successfully parsed, I don't see much issue with this given. External services with Datadog propagation, written in other languages, are all already using the first extracted style, this then PR increases configuration consistency in heterogeneous deployments. |
Note here: check if there are any system-tests that cover this change (or if the Ruby tracer has been skipped in any relevant system-test because this change wasn't implemented before). |
Codecov Report
@@ Coverage Diff @@
## master #2879 +/- ##
==========================================
- Coverage 98.08% 98.07% -0.01%
==========================================
Files 1301 1301
Lines 72065 72058 -7
Branches 3310 3307 -3
==========================================
- Hits 70683 70671 -12
- Misses 1382 1387 +5
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
ad5ad9a
to
1449ea4
Compare
…ccesing tracing.distributed_tracing.propagation_inject_style and tracing.distributed_tracing.propagation_extract_style
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With system-tests coverage, I'm confident this will bring us closer to how Datadog advertises propagation precedence: DataDog/system-tests#1454
What does this PR do?
Currently, when extracting from multiple contexts, our propagation would validate against each other to ensure the trace id and span id are identical. This approach ensure that if user includes
Datadog
proprietary propagation, those proprietary tags would be propagated and the user will remain having full functionalities that Datadog offers.If there is a mismatched being detected, since we are not able to identify the source of truth, it would leads to a broken distributed trace. The third scenario on the right illustrated a possible scenario with a mismatched detected given 128 bits trace ID upstream.
This PR changes the propagation behaviour by removing the validation phase for multiple extractions. This means the first successful extraction would always wins. W3C trace context propagation is fully compatible but user prioritizing
B3
extraction would lose Datadog's proprietary tags.System test for trace header precedence: DataDog/system-tests#1454