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: text/0071-continue-trace-over-process-boundaries.md
+11-13Lines changed: 11 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,34 +41,32 @@ In the [develop docs](https://develop.sentry.dev/) a specification of this RFC w
41
41
42
42
### Retrieving tracing information via environment variables:
43
43
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.
46
46
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:
49
48
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)
54
51
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.
56
54
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.
58
56
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.
60
58
61
59
### Creating tracing information on process start up
62
60
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.
64
62
65
63
See [Unified Propagation Mechanism](https://develop.sentry.dev/sdk/performance/dynamic-sampling-context/#unified-propagation-mechanism) for details.
66
64
67
65
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.
68
66
69
67
### Propagating/sending tracing information via environment variables:
70
68
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.
72
70
73
71
## Option B) Passing tracing information via files
0 commit comments