Skip to content
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

fix: Don't propagate sampled traces #4265

Merged
merged 4 commits into from
Nov 19, 2024
Merged

fix: Don't propagate sampled traces #4265

merged 4 commits into from
Nov 19, 2024

Conversation

loewenheim
Copy link
Contributor

@loewenheim loewenheim requested a review from a team as a code owner November 19, 2024 08:53
@loewenheim loewenheim self-assigned this Nov 19, 2024
Comment on lines +298 to +305
let traces_sample_rate = config.traces_sample_rate;
// We're explicitly setting a `traces_sampler` here to circumvent trace
// propagation. A trace sampler that always just returns the constant
// `traces_sample_rate` is equivalent to using the `traces_sample_rate`
// directly, except it doesn't take into account whether the context
// was previously sampled. We don't want to take that into account because
// SDKs send headers with their envelopes that erroneously cause us to
// sample transactions.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please let me know if this comment doesn't explain the problem correctly or clearly enough.

relay-log/src/setup.rs Outdated Show resolved Hide resolved
relay-log/src/setup.rs Outdated Show resolved Hide resolved
@loewenheim loewenheim enabled auto-merge (squash) November 19, 2024 09:09
@loewenheim loewenheim merged commit be6a8c4 into master Nov 19, 2024
23 checks passed
@loewenheim loewenheim deleted the fix/propagate-traces branch November 19, 2024 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants