Closed daniel-ferguson closed 1 week ago
This issue is stale because it has been open 90 days with no activity. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled
This issue was closed because it has been marked as stale for 30 days with no activity.
Describe the bug
After following https://aws-otel.github.io/docs/getting-started/lambda/lambda-js to add a layer to my lambda function I can see traces being generated, and showing up in X-Ray. However, no HTTP services that this function calls are connected to the trace. Looking at the HTTP headers received by a downstream I see
Traceparent:
set correctly, but noX-Amzn-Trace-Id:
- indicating that auto-instrumentation & propagation is working, but not with the X-Ray propagator.Looking at the logs I see the lines:
I know
opentelemetry-js
currently doesn't support setting the propagator via theOTEL_PROPAGATORS
environment variable (https://github.com/open-telemetry/opentelemetry-js/pull/4727) - but I saw you have in place something that looks like it could be workaround, manually intialising an X-Ray propagator: https://github.com/aws-observability/aws-otel-lambda/blob/b685c99d626e6e71034c69369bda00317665602f/nodejs/wrapper-adot/src/adot-extension.tsBy changing that code to always set
global.configureSdkRegistration
, rather than only do it whenOTEL_PROPAGATORS
is falsey results in trace propagation working correctly. I confirmed this by making the change, runningbuild.sh
and using the resulting lambda layer with my function.What version of collector/language SDK version did you use? Collector:
v0.39.0
Lambda instrumentation:v0.41.0
OpenTelemetry for Javascript:v1.18.1
What language layer did you use? Config:
NodeJS