From 5bb00141bf27c0738e754b013de1f9fa79a8bfd9 Mon Sep 17 00:00:00 2001 From: vmarchaud Date: Sun, 5 Jan 2020 13:24:04 +0100 Subject: [PATCH] chore: address PR comments --- .../opentelemetry-node/src/instrumentation/PluginLoader.ts | 4 +++- .../test/instrumentation/PluginLoader.test.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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(); });