File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
packages/instrumentation-pg/test Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -991,6 +991,10 @@ describe('pg semantic conventions env variable', () => {
991991 const testPostgres = process . env . RUN_POSTGRES_TESTS ; // For CI: assumes local postgres db is already available
992992 const testPostgresLocally = process . env . RUN_POSTGRES_TESTS_LOCAL ; // For local: spins up local postgres db via docker
993993 const shouldTest = testPostgres || testPostgresLocally ; // Skips these tests if false (default)
994+ // Here we are `require`ing *before* the instrumentation is created below.
995+ // In *general* this is a potential instrumentation issue, but this works for
996+ // `pg-pool` instrumentation because it patches the `pgPool.prototype`
997+ // (i.e. not a top-level export).
994998 const pgPool = require ( 'pg-pool' ) ;
995999 pool = new pgPool ( CONFIG ) ;
9961000
You can’t perform that action at this time.
0 commit comments