-
Notifications
You must be signed in to change notification settings - Fork 534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@opentelemetry/instrumentation-aws-lambda
is not compatible with @opentelemetry/instrumentation@^0.34.0
#1285
@opentelemetry/instrumentation-aws-lambda
is not compatible with @opentelemetry/instrumentation@^0.34.0
#1285
Comments
We knew this when we updated the instrumentation. The lambda instrumentation will probably have to switch to using require-in-the-middle directly |
fyi @willarmiros |
Should we rate this as bug? If instrumentations require different versions of |
This is blocking our upgrade to 1.8.0 and 0.34. Do we have a sense of the amount of work this would take? |
I changed the label from discussion to bug. We might consider to remove |
Just for my understanding, why does this prevent users from upgrading? |
@Flarna can you help me understand the work required to fix this durably? I'm happy to help out and do the work, but I'm not familiar with RITM or how it's used here. |
@Aneurysm9 I am working on a pull request now. |
I'm not sure I understand what the bug is? The user may get 2 versions of require in the middle but both would work fine. There would just be 2 wraps on require which would have a minor performance impact still much better than the 1 wrap per instrumentation we had before. |
@mhassan1 mostly out of caution. In the past, whenever we've seen multiple versions of opentelemetry packages we've seen issues where all observability disappears. |
@dyladan Here are two possible resolutions to this issue:
I think the first option is cleaner, since it avoids polluting instrumentation plugins with RITM logic and |
I agree the first option is cleaner |
Mainly based on the comment from @icco that it blocks updates. I agree that having two instances of
I vote also for option 1. |
In open-telemetry/opentelemetry-js#3161, we started passing
null
torequire-in-the-middle
(RITM), which allows us to intercept allrequire
calls with a single RITM instance; however, whennull
is passed, RITM no longer interceptsrequire
calls to absolute paths. Since@opentelemetry/instrumentation-aws-lambda
needs an absolute path to be intercepted, we cannot upgrade to@opentelemetry/instrumentation@^0.34.0
. As far as I can tell,@opentelemetry/instrumentation-aws-lambda
is the only instrumentation plugin that uses an absolute path.We will need to resolve this one of these ways:
require-in-the-middle
, add support for absolute paths whennull
is passed@opentelemetry/instrumentation
, handle this scenario by creating a new instance ofrequire-in-the-middle
, passing the absolute path@opentelemetry/instrumentation-aws-lambda
, instrument code using another method, e.g. userequire-in-the-middle
directly, or patch the code directlyThe text was updated successfully, but these errors were encountered: