-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: Allow passing of include
or exclude
list via module.register()
#124
Conversation
a9e94b5
to
035be54
Compare
include
or exclude
list via register
include
or exclude
list via module.register()
…ort-in-the-middle into feat/include-exclude
@timfish previously I patch the lib and use |
Hey @vchirikov. Yep, a good idea. PRs are welcome. Just keep it non-breaking, add some tests and it will likely get merged and released quickly! |
Closes #12878 I added this feature to `import-in-the-middle` which was released in v1.9.0: - nodejs/import-in-the-middle#124 This PR changes the hook from `@opentelemetry/instrumentation/hook.mjs` to `import-in-the-middle/hook.mjs` as it was only pasing though anyway and the otel hook doesn't pass the `initialize` export.
Really appreciate people trying to work through this for real and make the fix a proper library options. I tried using the exclude option to avoid wrapping the
That said, it does not seem to be enough. Only the
to Does someone actually have a working example where |
There has already been a request to allow regular expressions for Until then, you could use I think #146 is the long term solution for most. |
This PR adds the ability to pass an array of modules or URLs to
include
orexclude
from wrapping via thedata
property passed as the third argument ofmodule.register()
.Since
import-in-the-middle
has issues that we don't know how to solve, it makes sense to allow a way to work around these issues so it can still be used.