From 5f9f1d4fae3370c1d37e2a3c0fb585c4471683f8 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Wed, 16 Aug 2023 19:19:44 +0200 Subject: [PATCH 1/4] [FaaS] Add an option to use the X-Ray env var as main parent. This is done in order to help users migrating from the previous behavior (which is offered via this new flag) and the new approach (which uses links). --- docs/faas/aws-lambda.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/faas/aws-lambda.md b/docs/faas/aws-lambda.md index 41ccb4cce5..a60a9a6b8e 100644 --- a/docs/faas/aws-lambda.md +++ b/docs/faas/aws-lambda.md @@ -66,6 +66,10 @@ contain an incomplete trace context which indicates X-Ray isn’t enabled. The e `Context` will be valid and sampled only if AWS X-Ray has been enabled for the Lambda function. A user can disable AWS X-Ray for the function if the X-Ray Span Link is not desired. +Instrumentation SHOULD include an explicit option to use `Context` in `_X_AMZN_TRACE_ID` as parent insted of `Link`, +as long as it is a valid `Context`, as described above. Else, it will follow the standard behavior of using the extracted value +from the user's configured propagators applied to the HTTP headers. + **Note**: When instrumenting a Java AWS Lambda, instrumentation SHOULD first try to parse an OpenTelemetry `Context` out of the system property `com.amazonaws.xray.traceHeader` using the [AWS X-Ray Propagator](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/api-propagators.md) before checking and attempting to parse the environment variable above. [Span Link]: https://opentelemetry.io/docs/concepts/signals/traces/#span-links From 33bbe47f54a0e7b1f3475c2086cb48ae3015666e Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Wed, 16 Aug 2023 19:33:56 +0200 Subject: [PATCH 2/4] Add a blank CHANGELOG entry for now. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8c5f52301..674a996842 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,8 @@ release. - Clarify that `http/dup` has higher precedence than `http` in case both values are present in `OTEL_SEMCONV_STABILITY_OPT_IN` ([#249](https://github.com/open-telemetry/semantic-conventions/pull/249)) +- FaaS: Add an option to use the X-Ray env var as main parent. + ([]()) ## v1.21.0 (2023-07-13) From ce370c69aa05efe34be355aca390a7a00583ab92 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Thu, 17 Aug 2023 12:36:10 -0600 Subject: [PATCH 3/4] Update CHANGELOG.md Co-authored-by: Daniel Dyla --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 674a996842..04ac8da287 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,7 +49,7 @@ release. in `OTEL_SEMCONV_STABILITY_OPT_IN` ([#249](https://github.com/open-telemetry/semantic-conventions/pull/249)) - FaaS: Add an option to use the X-Ray env var as main parent. - ([]()) + ([#263](https://github.com/open-telemetry/semantic-conventions/pull/263)) ## v1.21.0 (2023-07-13) From 791496ecf1486fd6e6c3a25e7c745277683a68a5 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Thu, 17 Aug 2023 12:36:41 -0600 Subject: [PATCH 4/4] Update docs/faas/aws-lambda.md Co-authored-by: Alex Boten --- docs/faas/aws-lambda.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/faas/aws-lambda.md b/docs/faas/aws-lambda.md index a60a9a6b8e..669285ea60 100644 --- a/docs/faas/aws-lambda.md +++ b/docs/faas/aws-lambda.md @@ -67,7 +67,7 @@ contain an incomplete trace context which indicates X-Ray isn’t enabled. The e disable AWS X-Ray for the function if the X-Ray Span Link is not desired. Instrumentation SHOULD include an explicit option to use `Context` in `_X_AMZN_TRACE_ID` as parent insted of `Link`, -as long as it is a valid `Context`, as described above. Else, it will follow the standard behavior of using the extracted value +as long as it is a valid `Context`, as described above. If the option is not present, it will follow the standard behavior of using the extracted value from the user's configured propagators applied to the HTTP headers. **Note**: When instrumenting a Java AWS Lambda, instrumentation SHOULD first try to parse an OpenTelemetry `Context` out of the system property `com.amazonaws.xray.traceHeader` using the [AWS X-Ray Propagator](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/api-propagators.md) before checking and attempting to parse the environment variable above.