File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
experimental/packages/opentelemetry-instrumentation/src/platform/node Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ For notes on migrating to 2.x / 0.200.x see [the upgrade guide](doc/upgrade-to-2
1414
1515### :rocket : Features
1616
17+ * chore(opentelemetry-instrumentation): improve ` _warnOnPreloadedModules ` function not to show warning logs when the module is not marked as loaded
18+
1719### :bug : Bug Fixes
1820
1921### :books : Documentation
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ export abstract class InstrumentationBase<
148148 const { name } = module ;
149149 try {
150150 const resolvedModule = require . resolve ( name ) ;
151- if ( require . cache [ resolvedModule ] ) {
151+ if ( require . cache [ resolvedModule ] ?. loaded ) {
152152 // Module is already cached, which means the instrumentation hook might not work
153153 this . _diag . warn (
154154 `Module ${ name } has been loaded before ${ this . instrumentationName } so it might not work, please initialize it before requiring ${ name } `
You can’t perform that action at this time.
0 commit comments