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
Update aws lambda spec to remove X-Ray Env propagation (open-telemetry#3166)
* Update aws lambda spec to remove X-Ray Env propagation
Per discussion in the FAAS SIG, we decided that the aws x-ray environment variable should be moved to a span link to avoid interfering with the configured propagators.
The parent of the span MUST be determined by considering both the environment and any headers or attributes
67
-
available from the event.
68
-
69
-
If the `_X_AMZN_TRACE_ID` environment variable is set, instrumentations SHOULD first try to parse an
66
+
If the `_X_AMZN_TRACE_ID` environment variable is set, instrumentation SHOULD try to parse an
70
67
OpenTelemetry `Context` out of it using the [AWS X-Ray Propagator](../../../context/api-propagators.md). If the
71
-
resulting `Context` is [valid](../../api.md#isvalid) and sampled, then this `Context` is the parent of the
72
-
function span. We check if it is valid because sometimes the `_X_AMZN_TRACE_ID` environment variable contains
73
-
an incomplete trace context which indicates X-Ray isn’t enabled. The environment variable will be set and the
68
+
resulting `Context` is [valid](../../api.md#isvalid) then a [Span Link][] SHOULD be added to the new Span's
69
+
[start options](../../api.md#specifying-links) with an associated attribute of `source=x-ray-env` to
70
+
indicate the source of the linked span.
71
+
Instrumentation MUST check if the context is valid before using it because the `_X_AMZN_TRACE_ID` environment variable can
72
+
contain an incomplete trace context which indicates X-Ray isn’t enabled. The environment variable will be set and the
74
73
`Context` will be valid and sampled only if AWS X-Ray has been enabled for the Lambda function. A user can
75
-
disable AWS X-Ray for the function if X-Ray propagation is not desired.
74
+
disable AWS X-Ray for the function if the X-Ray Span Link is not desired.
76
75
77
-
Otherwise, when X-Ray propagation fails, the user's configured propagators SHOULD be applied to the HTTP
78
-
headers of the request to extract a `Context`. For example, API Gateway proxy requests can be configured to
79
-
send HTTP headers to a Lambda function using [a body mapping template](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-override-request-response-parameters.html).
0 commit comments