opentelemetry-lambda
opentelemetry-lambda copied to clipboard
Conflict with others lambda layers
This issue is related to opentelemetry-lamba for NodeJS. My project is using Sentry to report all unhandled errors. We integrated Sentry into our project by using the official lambda layer. On top of it, we included this opentelemetry-lambda layer and we run into some issues. I was interested in the auto instrumentation opentelemetry provides, more specifically the one that collects traces regarding all http outgoing calls. It was not working and I figured out it was related to https://opentelemetry.io/blog/2022/troubleshooting-nodejs/#enable-before-require. Afer some investigation, I understand sentry code was required before opentelemetry, mainly because of this https://github.com/open-telemetry/opentelemetry-lambda/blob/main/nodejs/packages/layer/scripts/otel-handler#L3.
Are there is any reasons why we don't define the ordering that way?
export NODE_OPTIONS="--require /opt/wrapper.js ${NODE_OPTIONS}"
It used to be that way, but was changed to allow the wrapper itself to be configured. Perhaps there's a third way?
export NODE_OPTIONS="${OTEL_WRAPPER_OPTIONS} --require /opt/wrapper.js ${NODE_OPTIONS}"
This issue was marked stale. It will be closed in 30 days without additional activity.
Closed as inactive. Feel free to reopen if this issue is still relevant.