Skip to content

Commit 2e30a1c

Browse files
stephanie-andersonsentrivanaantonpirker
authored
Apply wording suggestions from code review
Co-authored-by: Ivana Kellyer <[email protected]> Co-authored-by: Anton Pirker <[email protected]>
1 parent c93add7 commit 2e30a1c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

develop-docs/sdk/telemetry/traces/dynamic-sampling-context.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ All of the attributes in the table below are required (non-optional) in a sense,
5050

5151
At the moment, only `release`, `environment` and `transaction` are used by the product for dynamic sampling functionality.
5252
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.
5454

5555
| Attribute | Type | Description | Example | Required Level |
5656
| --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | ------------------------------------ |
@@ -62,7 +62,7 @@ Additional entries such as `replay_id`, `org` and `sample_rand` are only using t
6262
| `environment` | string | The environment name as specified in client options. | `production`, `staging` | required |
6363
| `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) |
6464
| `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 |
6666
| `user_segment` [DEPRECATED] | string | User segment as set by the user with `scope.set_user()`. | | deprecated |
6767

6868
0: In any case, `trace_id`, `public_key`, and `sample_rate` should always be known to an SDK, so these values are strictly required.

develop-docs/sdk/telemetry/traces/index.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,16 @@ This Option replaces the non-standardized `tracingOrigins` option which was prev
6969

7070
This option disables trace continuation from unknown 3rd party services that happen to be instrumented by a Sentry SDK.
7171

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`.
7373

7474
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.
7575
The SDK should behave like it is the head of trace in this case.
7676

7777
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.
8080

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.
8282

8383
### `traceOptionsRequests`
8484

@@ -207,14 +207,14 @@ To increase the chance of capturing complete traces when users return a new samp
207207

208208
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.
209209

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 on the fly.
211211

212212
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.
213213

214214
- When the `tracesSampler` is invoked, this also applies to the return value of traces sampler. i.e. `trace["sentry-sample_rand"] < tracesSampler(context)`
215215
- 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`
216216

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.
218218

219219
```js
220220
tracesSampler: ({ name, parentSampleRate }) => {

0 commit comments

Comments
 (0)