diff --git a/plugins/node/opentelemetry-instrumentation-pg/test/pg-pool.test.ts b/plugins/node/opentelemetry-instrumentation-pg/test/pg-pool.test.ts index f0ac1508d9..2891184ec0 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/test/pg-pool.test.ts +++ b/plugins/node/opentelemetry-instrumentation-pg/test/pg-pool.test.ts @@ -114,6 +114,10 @@ describe('pg-pool', () => { function create(config: PgInstrumentationConfig = {}) { instrumentation.setConfig(config); instrumentation.enable(); + + // Disable and enable the instrumentation to visit unwrap calls + instrumentation.disable(); + instrumentation.enable(); } let pool: pgPool; diff --git a/plugins/node/opentelemetry-instrumentation-pg/test/pg.test.ts b/plugins/node/opentelemetry-instrumentation-pg/test/pg.test.ts index ecb9e6c7fd..adba2e072c 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/test/pg.test.ts +++ b/plugins/node/opentelemetry-instrumentation-pg/test/pg.test.ts @@ -108,6 +108,10 @@ describe('pg', () => { function create(config: PgInstrumentationConfig = {}) { instrumentation.setConfig(config); instrumentation.enable(); + + // Disable and enable the instrumentation to visit unwrap calls + instrumentation.disable(); + instrumentation.enable(); } let postgres: typeof pg;