Skip to content

Commit c7f009e

Browse files
Updated to make it work with tracing without performance. (#100)
Co-authored-by: Michi Hoffmann <[email protected]>
1 parent a43e84e commit c7f009e

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

text/0071-continue-trace-over-process-boundaries.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,34 +41,32 @@ In the [develop docs](https://develop.sentry.dev/) a specification of this RFC w
4141

4242
### Retrieving tracing information via environment variables:
4343

44-
When the SDK starts up it reads an environment variable `SENTRY_TRACING_USE_ENVIRONMENT` (defaults to `True`).
45-
If `SENTRY_TRACING_USE_ENVIRONMENT` is set to `true` (or `true|True|TRUE|yes|Yes|YES|y|1|on`) then the SDK reads the following environment variables:
44+
When the SDK starts up it reads an environment variable `SENTRY_USE_ENVIRONMENT`.
45+
If `SENTRY_USE_ENVIRONMENT` is set to `false` (or rather `false|False|FALSE|n|no|No|NO|off|Off|OFF|0`) then the SDK should not read tracing information from the environment. Otherwise (if `SENTRY_USE_ENVIRONMENT` is NOT set or set to an arbitrary value not in the list of falsy values) the SDK reads tracing information from the environment. So the default behaviour is trying to read tracing information from the environment.
4646

47-
- `SENTRY_TRACING_BAGGAGE` (similar to `baggage` HTTP header)
48-
- `SENTRY_TRACING_SENTRY_TRACE` (similar to `sentry-trace` HTTP header)
47+
The following environment variables is read:
4948

50-
The environment variables contain the same strings that the respecitve HTTP headers would contain.
51-
The SDK parses the string values from the environment variables and stores. SDKs can decide where the what to store this tracing information.
52-
53-
To successfully attach a transaction to an existing trace at least `SENTRY_TRACING_SENTRY_TRACE` must have data.
49+
- `SENTRY_BAGGAGE` (similar to `baggage` HTTP header)
50+
- `SENTRY_TRACE` (similar to `sentry-trace` HTTP header)
5451

55-
For dynamic sampling not to break, `SENTRY_TRACING_BAGGAGE` needs to include all information of the dynamic sampling context. The tracing information parsed from this must not be changed.
52+
The environment variables contain the same strings that the respecitve HTTP headers would contain.
53+
The SDK parses the string values from the environment variables and stores the information in the propagation context on the scope.
5654

57-
When `SENTRY_TRACING_USE_ENVIRONMENT` is set to `true` during startup also a so called "Root Transaction" should be created automatically. It should include all the trace information from the parsed tracing information and should be finished just before the process ends.
55+
To successfully attach a transaction to an existing trace at least `SENTRY_TRACE` must have data.
5856

59-
TODO: Maybe we should create a new `transaction_info.source` for this kind of root transactions?
57+
For dynamic sampling not to break, `SENTRY_BAGGAGE` needs to include all information of the dynamic sampling context. The tracing information parsed from this must not be changed.
6058

6159
### Creating tracing information on process start up
6260

63-
If `SENTRY_TRACING_USE_ENVIRONMENT` is set to `true` and no information can be found in `SENTRY_TRACING_BAGGAGE` or `SENTRY_TRACING_SENTRY_TRACE` then the current process is the head of trace and a dynamic sampling context should be created.
61+
If `SENTRY_USE_ENVIRONMENT` is set to `true` and no information can be found in `SENTRY_BAGGAGE` or `SENTRY_TRACE` then the current process is the head of trace and a dynamic sampling context should be created.
6462

6563
See [Unified Propagation Mechanism](https://develop.sentry.dev/sdk/performance/dynamic-sampling-context/#unified-propagation-mechanism) for details.
6664

6765
See [Dynamic Sampling Context Payloads](https://develop.sentry.dev/sdk/performance/dynamic-sampling-context/#payloads) to see what data needs to be included in the dynamic sampling context.
6866

6967
### Propagating/sending tracing information via environment variables:
7068

71-
The integrations that patch functions that are used for spawning new processes (`StdlibIntegration` in Python) should be changed so they use the parsed tracing information (if any) and serialize it to the environment variables (`SENTRY_TRACING_BAGGAGE`, `SENTRY_TRACING_SENTRY_TRACE`) for the newly spawned process. The variable `SENTRY_TRACING_USE_ENVIRONMENT` should also be set to `true` so the receiving process is picking up the information.
69+
The integrations that patch functions that are used for spawning new processes (`StdlibIntegration` in Python) should be changed so they use the parsed tracing information (if any) and serialize it to the environment variables (`SENTRY_BAGGAGE`, `SENTRY_TRACE`) for the newly spawned process. The variable `SENTRY_USE_ENVIRONMENT` should also be set to `true` so the receiving process is picking up the information.
7270

7371
## Option B) Passing tracing information via files
7472

0 commit comments

Comments
 (0)