Skip to content

Commit 97e9f2f

Browse files
authored
Update Doc for aws propagator default sampling behavior (open-telemetry#656)
1 parent 704f1d9 commit 97e9f2f

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

sdk-extension/opentelemetry-sdk-extension-aws/README.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ Next, use the provided `AwsXRayIdGenerator` to initialize the `TracerProvider`.
4646
Usage (AWS X-Ray Propagator)
4747
----------------------------
4848

49+
**NOTE**: Because the parent context extracted from the `X-Amzn-Trace-Id` header
50+
assumes the context is _not_ sampled by default, users should make sure to add
51+
`Sampled=1` to their `X-Amzn-Trace-Id` headers so that the child spans are
52+
sampled.
53+
4954
Use the provided AWS X-Ray Propagator to inject the necessary context into
5055
traces sent to external systems.
5156

sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/trace/propagation/aws_xray_format.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,17 @@
1818
1919
The **AWS X-Ray Propagator** provides a propagator that when used, adds a `trace
2020
header`_ to outgoing traces that is compatible with the AWS X-Ray backend service.
21-
This allows the trace context to be propagated when a trace span multiple AWS
21+
This allows the trace context to be propagated when a trace spans multiple AWS
2222
services.
2323
24+
The same propagator setup is used to extract a context sent by external systems
25+
so that child span have the correct parent context.
26+
27+
**NOTE**: Because the parent context parsed from the ``X-Amzn-Trace-Id`` header
28+
assumes the context is _not_ sampled by default, users should make sure to add
29+
``Sampled=1`` to their ``X-Amzn-Trace-Id`` headers so that the child spans are
30+
sampled.
31+
2432
Usage
2533
-----
2634

0 commit comments

Comments
 (0)