You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(node): Option to only wrap instrumented modules (#13139)
Likely closes many issues but I don't want to auto-close anything
specific here. We should probably confirm the issues are closed
individually.
`import-in-the-middle` by default wraps every ES module with a wrapping
module that later allows it exports to be modified. This has issues
though because the wrapping output of `import-in-the-middle` is not
compatible with all modules.
To help work around this I [added a
feature](nodejs/import-in-the-middle#146) to
`import-in-the-middle` that allows us to only wrap modules that we
specifically need to instrument.
```ts
import * as Sentry from '@sentry/node';
Sentry.init({
dsn: '__DSN__',
registerEsmLoaderHooks: { onlyHookedModules: true },
});
```
So far I've only changed the express integration test to use this new
mode.
0 commit comments