Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Add tracesSampler as source for sample_rate #619

Merged
merged 3 commits into from
Jun 28, 2022
Merged

Conversation

adinauer
Copy link
Member

Document internal discussion from Slack

Document internal discussion from Slack
@vercel
Copy link

vercel bot commented Jun 27, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
develop ✅ Ready (Inspect) Visit Preview Jun 27, 2022 at 0:51AM (UTC)

@@ -115,7 +115,7 @@ The value of this envelope header is a JSON object with the following fields:

- `trace_id` (string) - The original trace ID as generated by the SDK, UUID V4 encoded as a hexadecimal sequence with no dashes (e.g. `771a43a4192642f0b136d5159a501700`) that is a sequence of 32 hexadecimal digits. This must match the trace id of the submitted transaction item.
- `public_key` (string) - Public key from the DSN used by the SDK. It allows Sentry to sample traces spanning multiple projects, by resolving the same set of rules based on the starting project.
- `sample_rate` (string) - The sample rate as defined by the user on the SDK. This string should always be a number between (and including) 0 and 1 in basic float notation (`0.04242`) - no funky business like exponents or anything similar.
- `sample_rate` (string) - The sample rate as defined by the user on the SDK. This string should always be a number between (and including) 0 and 1 in basic float notation (`0.04242`) - no funky business like exponents or anything similar. If a `tracesSampler` callback was used for the sampling decision, its outcome should be used for `sample_rate` instead of the `tracesSampleRate` from `SentryOptions`. In case `tracesSampler` returns `True` it should be sent as `1.0`.
Copy link
Member Author

Choose a reason for hiding this comment

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

Should SDKs behave this way for LA release already?

Copy link
Member

Choose a reason for hiding this comment

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

yep

Copy link
Member

@lforst lforst left a comment

Choose a reason for hiding this comment

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

Good change!

src/docs/sdk/performance/dynamic-sampling-context.mdx Outdated Show resolved Hide resolved
@untitaker
Copy link
Member

Do we want to define what a return value of False means?

Co-authored-by: Luca Forstner <luca.forstner@gmail.com>
@adinauer
Copy link
Member Author

Do we want to define what a return value of False means?

I'd assume it means 0.0. Should I add it?

@untitaker
Copy link
Member

that sounds reasonable to me but i haven't thought it through

@adinauer adinauer merged commit df4674f into master Jun 28, 2022
@adinauer adinauer deleted the adinauer-patch-1 branch June 28, 2022 06:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants