From eacb63da1139c8802448614c040d40cd321d6602 Mon Sep 17 00:00:00 2001 From: jdoherty Date: Thu, 25 May 2023 08:18:31 -0400 Subject: [PATCH] Updated Documentation For Change in Behaviour of Reading X-Ray Tracing Info From Lambda (#27) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tyler Benson Co-authored-by: Christian Neumüller Co-authored-by: Josh Suereth --- CHANGELOG.md | 2 ++ .../trace/semantic_conventions/instrumentation/aws-lambda.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cb28f42e1..ca6606f864 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ release. ## Unreleased +- Updated AWS Java Lambda guidance - using system properties. + ### Semantic Conventions - Clarify the scope of the HTTP client span. diff --git a/specification/trace/semantic_conventions/instrumentation/aws-lambda.md b/specification/trace/semantic_conventions/instrumentation/aws-lambda.md index e8d5c43886..ea59a171a8 100644 --- a/specification/trace/semantic_conventions/instrumentation/aws-lambda.md +++ b/specification/trace/semantic_conventions/instrumentation/aws-lambda.md @@ -66,6 +66,8 @@ 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. +**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 ## API Gateway