Move X-Ray Env Variable propagation to span link instead of parent#7970
Move X-Ray Env Variable propagation to span link instead of parent#7970laurit merged 6 commits intoopen-telemetry:mainfrom
Conversation
open-telemetry/opentelemetry-specification#3166 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.
.../opentelemetry/instrumentation/awslambdacore/v1_0/internal/AwsXRayEnvSpanLinksExtractor.java
Outdated
Show resolved
Hide resolved
ebedbb4 to
dec42f8
Compare
dec42f8 to
89d7bc6
Compare
|
@tylerbenson Considering that all backends don't support span links would it make sense to make this configurable so vendors/users could revert to previous behaviour. WDYT? |
|
@laurit The only vendor that should care about the current behavior is Amazon/XRay. For everyone else, this behavior interferes with the regular trace propagation and results in broken traces. Moving it to a span link solves the broken propagation and maintains the information for x-ray customers. |
...opentelemetry/instrumentation/awslambdacore/v1_0/internal/AwsLambdaFunctionInstrumenter.java
Show resolved
Hide resolved
.../opentelemetry/instrumentation/awslambdacore/v1_0/internal/AwsXrayEnvSpanLinksExtractor.java
Outdated
Show resolved
Hide resolved
.../opentelemetry/instrumentation/awslambdacore/v1_0/internal/AwsXrayEnvSpanLinksExtractor.java
Outdated
Show resolved
Hide resolved
|
@tylerbenson I understand what you are trying to do. I haven't used aws lambdas myself so perhaps I'm misunderstanding something. Let me rephrase my question. Our aws sdk instrumentation https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/aws-sdk/aws-sdk-2.2/library#trace-propagation currently uses only x-ray headers for propagation. If a request sent from aws sdk triggers a lambda that should only have the x-ray header. Previously parent context was set based on that x-ray header, now a span link is created instead. Is it possible that on a backend that does not support span links previously you got a complete trace and now after these changes you'll get a broken trace (because of missing support for span links)? |
open-telemetry/opentelemetry-specification#3166
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.
Also related to #5167.