-
Notifications
You must be signed in to change notification settings - Fork 401
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
chore: make span.sampled reference span.context.sampling_priority and deprecate it #8461
chore: make span.sampled reference span.context.sampling_priority and deprecate it #8461
Conversation
Or do I make everything reference _sampling_priority_v1? and then deprecate span.sampled? |
Co-authored-by: Munir Abdinur <munir.abdinur@datadoghq.com>
Co-authored-by: Munir Abdinur <munir.abdinur@datadoghq.com>
Datadog ReportBranch report: ✅ 0 Failed, 26960 Passed, 140954 Skipped, 2h 55m 23.33s Total duration (6h 12m 38.2s time saved) |
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.
Want a review before fixing the test failures?
…mple) just set sampling_priority_v1 everywhere we set sampled
nope sorry, thought it was there, but realized a critical flaw. |
Pull request was converted to draft
BenchmarksBenchmark execution time: 2024-02-27 20:00:44 Comparing candidate commit 4c88a54 in PR branch Found 3 performance improvements and 5 performance regressions! Performance is the same for 111 metrics, 9 unstable metrics. scenario:coreapiscenario-context_with_data_no_listeners
scenario:coreapiscenario-core_dispatch_listeners
scenario:coreapiscenario-core_dispatch_no_listeners
scenario:coreapiscenario-set_item
scenario:httppropagationinject-ids_only
scenario:httppropagationinject-with_tags_max_size
scenario:sethttpmeta-obfuscation-regular-case-implicit-query
scenario:sethttpmeta-useragentvariant_not_exists_2
|
…ncing span.context.sampling_priority internally, make span.sampled behavior replicate original behavior
c85a1a4
to
3f5c763
Compare
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.
LGTM for ml_obs 👍
With
span.sampled
being outdated, and no longer reliable as a way to tell if a span is actually being sampled, we make this change to make its value referencespan.context.sampling_priority
which is what actually matters when it comes to sampling. This deprecates span.sampled and removes its use internally, replacing it with checks for span.context.sampling_priority to mimic behavior.If the value of
span.context.sampling_priority
, isNone
we know that sampling hasn't yet run, and then maintain the original behavior ofspan.sampled
beingTrue
until sampling is run, if it's >0 we know that the span has been sampled, if <=0 we know the span has not been sampled.Checklist
changelog/no-changelog
is set@DataDog/apm-tees
.@DataDog/security-design-and-guidance
.Reviewer Checklist