-
-
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
Only Spans Docs #11731
base: master
Are you sure you want to change the base?
Only Spans Docs #11731
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
The `parentSampleRate` is a propagated value inside the baggage, using key `sentry-sample_rand`. | ||
The value stems from a truly random number between 0 and 1, generated when a new trace is started. If the SDK does not receive such a number in an incoming trace, a new, truly random number between 0 and 1 is generated. | ||
|
||
In the following cases, the SDK must compare sample rates against this `parentSampleRate` instead of `math.random()`: |
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.
This should be:
In the following cases, the SDK must compare sample rates against this `parentSampleRate` instead of `math.random()`: | |
In the following cases, the SDK must compare sample rates against this `sentry-sample_rand` instead of `math.random()`: |
Should we rephrase this, that the SDK always compares with the sample_rand
value, especially the two places? In reality, the SDK should never create a new random number during sampling, only ever when initializing a trace that doesn't have the random value attached yet.
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.
Yep, I'll re-phrase the entire paragraph, as I'm not happy with the current state.
``` | ||
|
||
The `parentSampleRate` is a propagated value inside the baggage, using key `sentry-sample_rand`. | ||
The value stems from a truly random number between 0 and 1, generated when a new trace is started. If the SDK does not receive such a number in an incoming trace, a new, truly random number between 0 and 1 is generated. |
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.
nit: Should we clarify that the value must be placed in baggage and propagated from now on?
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.
See above, "The parentSampleRate
is a propagated value inside the baggage, using key sentry-sample_rand
."
|
||
## Parent Sampling Origins | ||
|
||
If the SDK can parse an org ID from the configured DSN, this value must be propagated as a baggage entry with the key `sentry-org`. Given a DSN of `https://[email protected]/1`, the org ID is 1, based on `o1`. |
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.
This doesn't cover self-hosted, most organizations there will have org ID 1. If we're OK with this restriction, I think we should write this down. If we're not OK with this restriction, we'd need to add an additional identifier from the instance, though I currently don't have a good idea where to get this from.
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.
I'll add this limitation for self-hosted and refer to using the org
option in such cases.
Co-authored-by: Jan Michael Auer <[email protected]>
Co-authored-by: Jan Michael Auer <[email protected]>
No description provided.