Conversation
The snuba project is moving off server-side dynamic sampling. Move the sampling rules into the SDK so the client makes the same decisions. A request that carries a sampling decision from the caller keeps it, so traces stay complete. Traces that start in snuba use the base rate, a separate rate for health check requests, and full sampling in development-style environments. The replay ID boost has no meaning for snuba and is left out. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G5hviFo9NtMorc77sdcYRC
Nearly all snuba requests carry a sampling decision from the caller, and the traces_sampler kept every sampled one. That volume is set by the callers' sample rates, so snuba had no lever of its own on the size of its project. Keep a caller-sampled trace at SENTRY_INHERITED_TRACE_SAMPLE_RATE. The decision is derived from the trace id, so every snuba request of one trace gets the same answer, and the bucketing matches the one sentry uses in its transport so both services keep the same traces when they run with the same rate. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
traces_sampler, from the earlier closed PR feat(sentry): Replace the flat trace sample rate with a traces sampler #8445.SENTRY_INHERITED_TRACE_SAMPLE_RATE, default 0.1. This is the main lever on the Snuba project volume, since 96% of its transactions inherit a decision from the Sentry backend.SENTRY_TRACE_SAMPLE_RATE. Health checks stay at 0. Development environments stay at 100%.