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: docs/platforms/javascript/common/tracing/distributed-tracing/index.mdx
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,3 +60,32 @@ Server-side SDKs handle traces automatically on a per-request basis. This means
60
60
</PlatformCategorySection>
61
61
62
62
If necessary, you can override the default trace duration by [manually starting a new trace](./custom-instrumentation#starting-a-new-trace).
63
+
64
+
## How Sampling Propagates in Distributed Traces
65
+
66
+
Sentry uses a "head-based" sampling approach:
67
+
68
+
- A sampling decision is made in the originating service (the "head")
69
+
- This decision is propagated to all downstream services
70
+
71
+
The two key headers are:
72
+
-`sentry-trace`: Contains trace ID, span ID, and sampling decision
73
+
-`baggage`: Contains additional trace metadata including sample rate
74
+
75
+
Sentry automatically attaches these headers to outgoing HTTP requests when using the `browserTracingIntegration`. For other communication channels like WebSockets, you can manually propagate trace information:
0 commit comments