-
Notifications
You must be signed in to change notification settings - Fork 765
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
Create an activity even when SamplingDecision is Drop #1715
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1715 +/- ##
=======================================
Coverage 82.18% 82.18%
=======================================
Files 250 250
Lines 6763 6758 -5
=======================================
- Hits 5558 5554 -4
+ Misses 1205 1204 -1
|
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.
While this gets us closer to the spec, it creates an additional issue of broken traces.
If A->B->C, and A,C sampling decision is Record&Sampler, but B is Drop. If we create new Activity for B, and C considers B as its parent, then we'll not be able to stitch together A->C in backends, as C's parent is B, which is not stored anywhere.
This can be alleviated, but it requires us to device a strategy. Most likely this requires help from .net runtime as well.
https://github.com/open-telemetry/opentelemetry-specification/pull/998/files#r517616726
Something seems off about this. Looks like the current behavior is we create the root but not children. That's great for perf. Could the problem be in the instrumentation?
|
The current issue is - we are not in compliance with the spec, as spec says "a new Span with new SpanId must be created irrespective of Sampling outcome.". To make us compliant with that part of the spec, we need to create an Activity always with PropagationData only. This ensure new SpanId is generated. But this causes broken trace. Some of these were discussed in https://github.com/open-telemetry/opentelemetry-specification/pull/998/files#r517616726. But I am yet to find out if any language has this implemented correctly. If .NET needs to fix that issue, we'll likely need changes from .NET runtime itself. |
The issue with instrumentations not propagating - is tracked here : #1561 Its closely related issue. |
Closing this PR as we need to decide on the best approach to ensure that there are no broken traces due to differential sampling of spans within a single trace. |
Fixes #1709.
Changes