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
I'm trying to create a Quarkus native lambda and enable XRay tracing. We're making use of the quarkus-opentelemetry extension which offers some automatic instrumentation of various Quarkus features, i.e @WithSpan.
We've enabled the Active tracing mode in the Lambda but we are unable to correctly propagate the XRay context to that extension. It was suggested to use the io.opentelemetry.contrib:opentelemetry-aws-xray-propagator but unfortunately this didn't help. And looking at the implementation I think this is because of the AwsXrayPropagator not selecting the correct header:
In the AWS docs it looks like that variable is not populated in the provided runtimes (and debugging the lambda confirms that):
_X_AMZN_TRACE_ID – The X-Ray tracing header. This environment variable changes with each invocation.
This environment variable is not defined for OS-only runtimes (the provided runtime family). You can set _X_AMZN_TRACE_ID for custom runtimes using the Lambda-Runtime-Trace-Id response header from the Next invocation.
For Java runtime versions 17 and later, this environment variable is not used. Instead, Lambda stores tracing information in the com.amazonaws.xray.traceHeader system property.
Component(s)
aws-xray-propagator
What happened?
Description
I'm trying to create a Quarkus native lambda and enable XRay tracing. We're making use of the
quarkus-opentelemetry
extension which offers some automatic instrumentation of various Quarkus features, i.e@WithSpan
.We've enabled the Active tracing mode in the Lambda but we are unable to correctly propagate the XRay context to that extension. It was suggested to use the
io.opentelemetry.contrib:opentelemetry-aws-xray-propagator
but unfortunately this didn't help. And looking at the implementation I think this is because of theAwsXrayPropagator
not selecting the correct header:opentelemetry-java-contrib/aws-xray-propagator/src/main/java/io/opentelemetry/contrib/awsxray/propagator/AwsXrayPropagator.java
Line 48 in 6a44e04
In the AWS docs it looks like that variable is not populated in the
provided
runtimes (and debugging the lambda confirms that):Steps to Reproduce
A reproducer is provided here: https://github.com/DSkoufis/quarkus-otel-lambda/tree/main
Expected Result
Trace context to be set correctly using XRay's properties
Actual Result
The propagator is unable to extract the context meaning that a new trace is created:
Component version
1.32.0-alpha
Log output
No response
Additional context
While debugging the quarkus native lambda I noticed that we can still get the headers through using the
com.amazonaws.xray.traceHeader
.The most relevant example I've found is this: https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/aws-lambda/aws-lambda-core-1.0/library/src/main/java/io/opentelemetry/instrumentation/awslambdacore/v1_0/internal/AwsXrayEnvSpanLinksExtractor.java#L29
through the
io.opentelemetry.instrumentation:opentelemetry-aws-lambda-core-1.0
module.The text was updated successfully, but these errors were encountered: