opentelemetry-java-instrumentation
opentelemetry-java-instrumentation copied to clipboard
[aws-lambda] POC - Request for Comments - Add support to carrier pre-processing in aws-lambda instrumentation
This PR is a POC for the proposal FaaS: Change requirements regarding handling of AWS Lambda-provided SpanContext
In this PR we:
- Change the default behaviour of lambda to always try to include AWS X-Ray environment traces keys in the carrier that will be offered to the
extractoperation of the global propagators. ~* Adds a new optionotel.instrumentation.aws-lambda.link-xray-traces(also as env varOTEL_INSTRUMENTATION_AWS_LAMBDA_LINK_XRAY_TRACES) to allow users to include X-Ray traces originated from the lambda environment as span links.~
p.s.: there is no way to configure the global context propagators to include the X-Ray propagator to fully validate this change.
@tylerbenson could you help reviewing this
I'm trying to get clarification/confirmation from the TC. Once I get that, I'll review.
I'm trying to get clarification/confirmation from the TC. Once I get that, I'll review.
Can you provide more information on what clarification/confirmation you are seeking?
So there's a few fundamental decisions that were made in OTEL:
- Message passing tracing will use links as default - see approved OTEP 220.
- The TC weighed in on AWS lambda discussions from FAAS WG here.
Given these two, there's one central problem I see with this PR:
We should be preparing users for the new default parenting of spans in message passing scenarios to be links, not spans. We need to be working on a transition period and configuraiton to help users perserve the behavior they have today, but also let them know the default will be changing in OTEL (OTEP 220 guarantees this).
Given we are talking about breaking changes for users, I'd rather not churn how the instrumentation works any more than is strictly necessary. This PR does not move in the direction of OTEP 220, and I'm concerned the new environment variable that's added has the wrong default for the future of OTEL.
is this PR still relevant?
I don't think so.