-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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(js): Fix hierarchy and examples for sample rate configuration #13153
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Bundle ReportChanges will decrease total bundle size by 15 bytes (-0.0%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: sentry-docs-server-cjsAssets Changed:
view changes for bundle: sentry-docs-client-array-pushAssets Changed:
|
This option sets a fixed percentage of transactions to be captured: | ||
|
||
<PlatformContent includePath="/tracing/sample-rate" /> | ||
|
||
With `tracesSampleRate` set to `0.25`, approximately 25% of transactions will be recorded and sent to Sentry. This provides an even cross-section of transactions regardless of where in your app they occur. | ||
|
||
2. Sampling Function (`tracesSampler`) | ||
### Sampling Function (`tracesSampler`) |
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.
One thing im wondering, based on the feedback from the other Python PR, is if we should actually be changing the language of this section to suggest you can configure "A" traceSampler function; instead of implying this is a function we provide.
The way it was written originally def implies that its a function we give - which isnt the case if I understand right - but that might also be an unnecessary detail. What do you think?
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.
Yeah, that may make sense 🤔 IMHO we can still merge this PR and tweak the exact language we use in a follow up?
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.
Yup - im good with that.
This PR improves the "Tracing > Configure Sampling" page in two main ways:
tracesSampler
examples - you should always useinheritOrSampleWith
for the default sample rate, otherwise you break propagation. We need to make sure to use this consistently in examples!