You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe your environment
Using a 1.0.0 release candidate.
Steps to reproduce
Create a parent-based sampler with a ratio-based delegate sampler and a 0.5 sampling ratio. Create multiple generations of spans. You'll find that instead of always getting either a single trace with all the spans in it (from a sampled ancestor) or no traces (from a non-sampled ancestor), you randomly get multiple traces (a disconnected family tree).
What is the expected behavior?
The parent-based sampler should delegate sampling decisions to a different sampler only if a sampling decision was not previously made for a parent context (i.e., if the parent context is invalid). Repeated use of the parent sampler on descendants of a non-sampled span should result in a single, non-exported trace, just as it results in a single, exported trace from a sampled ancestor.
What is the actual behavior?
Descendants of non-sampled spans have invalid context instead. This results in many "orphan spans" when the delegate sampler, which handles invalid span contexts, kicks in.
Additional context
I think the correct behavior should be to always create spans with valid IDs. Although I'm not so familiar with the Go and Java SDKs, it seems like they always generate spans with valid IDs.
The text was updated successfully, but these errors were encountered:
Generate a new span ID for the Span, independently of the sampling decision. This is done so other components (such as logs or exception handling) can rely on a unique span ID, even if the Span is a non-recording instance.
Describe your environment
Using a 1.0.0 release candidate.
Steps to reproduce
Create a parent-based sampler with a ratio-based delegate sampler and a 0.5 sampling ratio. Create multiple generations of spans. You'll find that instead of always getting either a single trace with all the spans in it (from a sampled ancestor) or no traces (from a non-sampled ancestor), you randomly get multiple traces (a disconnected family tree).
What is the expected behavior?
The parent-based sampler should delegate sampling decisions to a different sampler only if a sampling decision was not previously made for a parent context (i.e., if the parent context is invalid). Repeated use of the parent sampler on descendants of a non-sampled span should result in a single, non-exported trace, just as it results in a single, exported trace from a sampled ancestor.
What is the actual behavior?
Descendants of non-sampled spans have invalid context instead. This results in many "orphan spans" when the delegate sampler, which handles invalid span contexts, kicks in.
Additional context
I think the correct behavior should be to always create spans with valid IDs. Although I'm not so familiar with the Go and Java SDKs, it seems like they always generate spans with valid IDs.
The text was updated successfully, but these errors were encountered: