feat: Allow passing of include or exclude list via module.register()#124
feat: Allow passing of include or exclude list via module.register()#124timfish merged 9 commits intonodejs:mainfrom
include or exclude list via module.register()#124Conversation
a9e94b5 to
035be54
Compare
include or exclude list via registerinclude 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
includeorexcludefrom wrapping via thedataproperty passed as the third argument ofmodule.register().Since
import-in-the-middlehas 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.