|
2 | 2 | title: Distributed Tracing |
3 | 3 | --- |
4 | 4 |
|
5 | | -This document describes how a SDK should propagate information between different services to connect all telemetry (errors, profiles, replays, transaction, check-ins, ...) from those services into one trace. |
| 5 | +This document describes how an SDK should propagate information between different services to connect all telemetry (errors, profiles, replays, transaction, check-ins, ...) from those services into one trace. |
6 | 6 |
|
7 | 7 | For an overview see [Distributed Tracing](https://docs.sentry.io/product/performance/distributed-tracing/) in the product docs. |
8 | 8 |
|
9 | 9 | Sentry uses three containers to hold trace information [`sentry-trace`](/sdk/performance/#header-sentry-trace), [`traceparent`](/sdk/performance/#header-traceparent) and [`baggage`](/sdk/performance/dynamic-sampling-context/#baggage-header). |
10 | 10 |
|
11 | | -With these containers you can propagate a trace to a down-stream service. By either |
12 | | -- adding `sentry-trace`, `traceparent` and `baggage` HTTP headers (when doing outgoing HTTP requests), |
| 11 | +With these containers you can propagate a trace to a down-stream service by either: |
| 12 | +- adding `sentry-trace`, `traceparent` and `baggage` HTTP headers (when making outgoing HTTP requests), |
13 | 13 | - adding `sentry-trace`, `traceparent` and `baggage` as meta data (when putting tasks into a queue, details are specific to the queue you want to support), or |
14 | 14 | - setting environment variables (when calling another process). In this case the env variables should be called `SENTRY_TRACE`, `SENTRY_TRACEPARENT` and `SENTRY_BAGGAGE`. |
15 | 15 |
|
16 | 16 | The SDK running in the receiving service needs to make sure to pick up incoming trace information by |
17 | 17 | - reading `sentry-trace`, `traceparent` and `baggage` headers for each incoming HTTP request, |
18 | 18 | - reading `sentry-trace`, `traceparent` and `baggage` meta data when retrieving an item from a queue, or |
19 | | -- reading the environment variables `SENTRY_TRACE`, `SENTRY_TRACEPARENT` and `SENTRY_BAGGAGE` on start up. |
| 19 | +- reading the environment variables `SENTRY_TRACE`, `SENTRY_TRACEPARENT` and `SENTRY_BAGGAGE` on startup. |
20 | 20 |
|
21 | 21 | In case both `sentry-trace` and `traceparent` are present, `sentry-trace` takes precedence. |
22 | 22 |
|
23 | | -This trace information should be stored in the "propagation context" of the current scope. This makes sure that all telemetry that is emmited from the receiving service to Sentry will include the correct trace information. |
| 23 | +This trace information should be stored in the "propagation context" of the current scope. This makes sure that all telemetry that is emitted from the receiving service to Sentry will include the correct trace information. |
0 commit comments