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

Commit

Permalink
Add tracesSampler as source for sample_rate (#619)
Browse files Browse the repository at this point in the history
* Add `tracesSampler` as source for `sample_rate`

Document internal discussion from Slack

* Update src/docs/sdk/performance/dynamic-sampling-context.mdx

Co-authored-by: Luca Forstner <luca.forstner@gmail.com>

* Update dynamic-sampling-context.mdx

Co-authored-by: Luca Forstner <luca.forstner@gmail.com>
  • Loading branch information
adinauer and lforst committed Jun 28, 2022
1 parent fbb25c6 commit df4674f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/docs/sdk/performance/dynamic-sampling-context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 result should be used for `sample_rate` instead of the `tracesSampleRate` from `SentryOptions`. In case `tracesSampler` returns `True` it should be sent as `1.0`, `False` should be sent as `0.0`.
- `release` (string) - The release name as specified in client options`.
- `environment` (string) - The environment name as specified in client options.
- `user_id` (string) - User ID as set by the user with <Link to="/sdk/unified-api/#scope">`scope.set_user`</Link>.
Expand Down

1 comment on commit df4674f

@vercel
Copy link

@vercel vercel bot commented on df4674f Jun 28, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

develop – ./

develop-git-master.sentry.dev
develop.sentry.dev

Please sign in to comment.