You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: develop-docs/sdk/telemetry/traces/dynamic-sampling-context.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ All of the attributes in the table below are required (non-optional) in a sense,
50
50
51
51
At the moment, only `release`, `environment` and `transaction` are used by the product for dynamic sampling functionality.
52
52
The rest of the context attributes, `trace_id`, `public_key`, `sampled` and `sample_rate`, are used by Relay for internal decisions (like transaction sample rate smoothing).
53
-
Additional entries such as `replay_id`, `org` and `sample_rand` are only using the DSC as a mean of transport.
53
+
Additional entries such as `replay_id`, `org` and `sample_rand` are only using the DSC as a means of transport.
54
54
55
55
| Attribute | Type | Description | Example | Required Level |
@@ -62,7 +62,7 @@ Additional entries such as `replay_id`, `org` and `sample_rand` are only using t
62
62
|`environment`| string | The environment name as specified in client options. |`production`, `staging`| required |
63
63
|`transaction`| string | The transaction name set on the scope. **Only include** if name has [good quality](#note-on-good-quality-transaction-names). |`/login`, `myApp.myController.login`| required (if known and good quality) |
64
64
|`org`| string | The org ID parsed from the DSN or received by a downstream SDK. |`1`| required |
65
-
|`sample_rand`| string | A trully random number originating from the head of trace SDK. |`0.5`| required |
65
+
|`sample_rand`| string | A truly random number originating from the head of trace SDK. |`0.5`| required |
66
66
|`user_segment`[DEPRECATED]| string | User segment as set by the user with `scope.set_user()`. || deprecated |
67
67
68
68
0: In any case, `trace_id`, `public_key`, and `sample_rate` should always be known to an SDK, so these values are strictly required.
Copy file name to clipboardExpand all lines: develop-docs/sdk/telemetry/traces/index.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,16 +69,16 @@ This Option replaces the non-standardized `tracingOrigins` option which was prev
69
69
70
70
This option disables trace continuation from unknown 3rd party services that happen to be instrumented by a Sentry SDK.
71
71
72
-
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`.
72
+
If the SDK can parse an org ID from the configured DSN, it 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`.
73
73
74
74
On incoming traces, the SDK must compare the `sentry-org` baggage value against its own parsed value from the DSN. Only if both match, the trace is continued. If there is no match, neither the trace ID, the parent sampling decision nor the baggage should be taken into account.
75
75
The SDK should behave like it is the head of trace in this case.
76
76
77
77
This behavior can be disabled by setting `strictTracePropagation: false` in the SDK init call.
78
-
Initially, SDKs should introduce the this option with a default values of `false`.
79
-
Once the majority of SDKs introduced this option, we will make it opt-out in a major version.
78
+
Initially, SDKs should introduce the this option with a default value of `false`.
79
+
Once the majority of SDKs introduced this option, we will change the default value to `true` (in a major version bump) making it opt-out.
80
80
81
-
The SDK must be configurable with an optional `org: <org-id>` setting that takes precedence over the parsed value from the DSN. This option should be set when running a self-hosted version of Sentry or if a none standard Sentry DSN is used, such as when using a local Relay.
81
+
The SDK must be configurable with an optional `org: <org-id>` setting that takes precedence over the parsed value from the DSN. This option should be set when running a self-hosted version of Sentry or if a non-standard Sentry DSN is used, such as when using a local Relay.
82
82
83
83
### `traceOptionsRequests`
84
84
@@ -207,14 +207,14 @@ To increase the chance of capturing complete traces when users return a new samp
207
207
208
208
The behavior of the static `tracesSampleRate` without the use of `tracesSampler` does not change. We continue to fully inherit sampling decisions for propagated traces and create a new one for started traces. In the future, we might change the default behavior of `tracesSampleRate`, too.
209
209
210
-
Once the SDK starts a new trace, `sentry-sample_rand` is filled with a truly random number. This also applies when the `tracesSampleRate` is set to `1.0`. If the SDK receives an incoming trace, containing a `sentry-sample_rand` entry in the baggage, this value should overwrite the currently stored number. For incoming traces without a `sentry-sample_rand` baggage entry (from old SDKs), the SDK inserts a new truly random number on-the-fly.
210
+
Once the SDK starts a new trace, `sentry-sample_rand` is filled with a truly random number. This also applies when the `tracesSampleRate` is set to `1.0`. If the SDK receives an incoming trace, containing a `sentry-sample_rand` entry in the baggage, this value should overwrite the currently stored number. For incoming traces without a `sentry-sample_rand` baggage entry (from old SDKs), the SDK inserts a new truly random number onthefly.
211
211
212
212
The SDK should exclusively use the stored random number and no longer use `math.random()` or similar anywhere else in the tracing related code base.
213
213
214
214
- When the `tracesSampler` is invoked, this also applies to the return value of traces sampler. i.e. `trace["sentry-sample_rand"] < tracesSampler(context)`
215
215
- Otherwise, when the SDK is the head of a trace, this applies to sample decisions based on `tracesSampleRate` , i.e. `trace["sentry-sample_rand"] < config.tracesSampleRate`
216
216
217
-
When using a `tracesSampler`, the most correct way to inherit parent sampling decisions is now to return the parent's sample rate instead of the decision as float (1.0). This way, we can still extrapolate counts correctly.
217
+
When using a `tracesSampler`, the correct way to inherit parent sampling decisions is now to return the parent's sample rate instead of the decision as float (1.0). This way, we can still extrapolate counts correctly.
0 commit comments