fix!(core): Distinguish disabled traces sampling strategy#1227
Open
szokeasaurusrex wants to merge 2 commits into
Open
fix!(core): Distinguish disabled traces sampling strategy#1227szokeasaurusrex wants to merge 2 commits into
szokeasaurusrex wants to merge 2 commits into
Conversation
d9beb1d to
1bdc841
Compare
Represent traces sampling as a single strategy enum so that leaving tracing unset is different from explicitly configuring a fixed sample rate of `0.0`. This keeps sampler callbacks, fixed rates, and disabled tracing mutually exclusive instead of modeling impossible combinations. This does not fully implement deferred trace propagation semantics yet. It makes the public API capable of representing the distinction the propagation spec needs, so a future implementation can treat unset tracing config differently from an explicit zero sample rate without another public API change. Update transaction sampling tests and the changelog for the enum-based behavior, including that disabled tracing never samples even when the transaction context carries an explicit sampling decision. BREAKING CHANGE: `ClientOptions::traces_sample_rate` and `ClientOptions::traces_sampler` fields are replaced by `ClientOptions::traces_sampling_strategy`.
d8e15af to
b34aaa6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Represent traces sampling as a single strategy enum so that leaving tracing unset is different from explicitly configuring a fixed sample rate of
0.0. This keeps sampler callbacks, fixed rates, and disabled tracing mutually exclusive instead of modeling impossible combinations.This does not fully implement deferred trace propagation semantics yet. It makes the public API capable of representing the distinction the propagation spec needs, so a future implementation can treat unset tracing config differently from an explicit zero sample rate without another public API change.
Update transaction sampling tests to cover the enum-based behavior, including that disabled tracing never samples even when the transaction context carries an explicit sampling decision.
BREAKING CHANGE:
ClientOptions::traces_sample_rateandClientOptions::traces_samplerfields are replaced byClientOptions::traces_sampling_strategy.