diff --git a/packages/opentelemetry-node/src/instrumentation/PluginLoader.ts b/packages/opentelemetry-node/src/instrumentation/PluginLoader.ts index 29c5e34fccf..453bc36ae43 100644 --- a/packages/opentelemetry-node/src/instrumentation/PluginLoader.ts +++ b/packages/opentelemetry-node/src/instrumentation/PluginLoader.ts @@ -89,7 +89,9 @@ export class PluginLoader { ); if (requiredModulesToHook.length > 0) { this.logger.warn( - `Some modules (${requiredModulesToHook}) were already required when their respective plugin were loaded, some plugins might not work. Make sure the SDK is setup before you require in other modules.` + `Some modules (${requiredModulesToHook.join( + ', ' + )}) were already required when their respective plugin was loaded, some plugins might not work. Make sure the SDK is setup before you require in other modules.` ); } diff --git a/packages/opentelemetry-node/test/instrumentation/PluginLoader.test.ts b/packages/opentelemetry-node/test/instrumentation/PluginLoader.test.ts index 8103955f85c..c74b9703215 100644 --- a/packages/opentelemetry-node/test/instrumentation/PluginLoader.test.ts +++ b/packages/opentelemetry-node/test/instrumentation/PluginLoader.test.ts @@ -238,7 +238,7 @@ describe('PluginLoader', () => { }, }; require('already-require-module'); - const pluginLoader = new PluginLoader(tracer, verifyWarnLogger); + const pluginLoader = new PluginLoader(registry, verifyWarnLogger); pluginLoader.load(alreadyRequiredPlugins); pluginLoader.unload(); });