-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[processor/tailsamplingprocessor] Late arriving spans can get different final decision from original #14760
Comments
Pinging code owners: @jpkrohling. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Thanks for the report. I do not have time to work on this right now, but I'll add this to my queue. It would expedite fixing this if you could provide a test case or perhaps a PR. |
I put out a PR, please take a look and see if I'm off base here. |
Thanks, I'm adding this to my review queue. |
What happened?
Description
I have a situation where spans for a trace are not sampled during the first decision point, but late arriving spans for the same trace are. This only reproduces for late arriving spans and only under certain conditions:
Steps to Reproduce
If the sampler is configured with a mix containing at least 1 string attribute policy, with invert match = true and another policy.
If you start a trace and send one span that causes the policies to evaluate to:
policies[0] = InvertSampled
policies[1] = NotSampled
then wait for the configured decision time, and send another span to complete the trace, the first span will be unsampled while the second one will be, which is not correct.
I sent two spans from a dotnet host that look like this:
The span generated from subActivity1 is delivered immediately, and after the decision wait time expires, produces the policy evaluations above. The trace's final decision is NotSampled. After completing the trace, the final span is delivered and immediately sampled and forwarded along.
Expected Result
Late arriving spans always get the same initial final decision, which in this case is NotSampled (if that is correct).
Actual Result
Late arriving spans do not always get the same initial final decision.
Collector version
v0.61.0
Environment information
Environment
OS: Ubuntu 20.04
OpenTelemetry Collector configuration
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: