chore(sentry): adjust trace sampling - #830
Merged
Merged
Conversation
mfocko
commented
Sep 15, 2026
| if rate := os.getenv("SENTRY_TRACES_SAMPLE_RATE"): | ||
| return float(rate) | ||
| # TODO: Take sampling_context into account | ||
| return 0.5 |
Member
Author
There was a problem hiding this comment.
For Packit we do 25% for staging and 10% for production. I guess we can start with 50% here and adjust on the go.
nforro
approved these changes
Sep 15, 2026
Lower down the sampling of transaction to save some quota. Especially since a lot of the caught events come from failed tool calls. By default sample 50% of the transactions, also allow for customization via environment variable, if needed. For more info see: https://docs.sentry.io/platforms/python/sampling/#sampling-transaction-events Fixes PACKIT-5116 Signed-off-by: Matej Focko <mfocko@packit.dev>
mfocko
force-pushed
the
chore/adjust-sentry-sampling
branch
from
September 15, 2026 11:05
4a4e371 to
12175cb
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.
Lower down the sampling of transaction to save some quota. Especially since a lot of the caught events come from failed tool calls.
By default sample 50% of the transactions, also allow for customization via environment variable, if needed.
For more info see: https://docs.sentry.io/platforms/python/sampling/#sampling-transaction-events
Fixes PACKIT-5116