-
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
[probabilisticsamplerprocessor] Support consistent intermediate span sampling (OTEP 226) #22058
Conversation
Feedback from @kentquirk: Please do not hand-parse TraceState. I accept! |
The latest commit 9010a67 has a regexp-based parser but still avoids allocations. I've updated the sampler processor to use the current tracestate-handling and draft-spec t-value and now also the s-value when using a HashSeed configuration. I started looking into the tail sampler processor, with its many configurations. I suspect that will be harder to achieve, but we should expect to have well-defined adjusted counts from our samplers, and we can accomplish this. |
@jmacd I would be interested to know how costly parsing/encoding decimal-based t-values is compared to the (optional) r-value, which is hex encoded. I have some performance concerns, since some consistent samplers (e.g., rate-limiting or reservoir-based samplers) need to analyze the t-value of a span to adjust their own sampling probability. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
@jmacd, should this be reopened? Was this pending on me? |
Description: Implements a consistent form of tail sampling described in OTEP 226. Extents the probabilisticsamplerprocessor to demonstrate this and to use in drafting a specification.
As shown, this specification is an alternative to https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/tracestate-probability-sampling.md.
Link to tracking Issue: See open-telemetry/opentelemetry-specification#1826
Testing: The existing consistent probability sampler specification describes a deterministic test to ensure the sampler passes a chi-squared test; that test can be re-used. Existing tests that use
HashSeed==0
are now tested using the newer logic. The existing test data uses 128 bits of random trace ID, so this is expected.More testing is needed for the tracestate logic. The logs sampling logic in this sampler has not been updated for this prototype.
Documentation: TODO