File tree Expand file tree Collapse file tree 5 files changed +9
-7
lines changed Expand file tree Collapse file tree 5 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 11import { afterAll , beforeAll } from 'vitest' ;
22
3- import { shutdownGlobalTelemetry , startGlobalTelemetry } from '../src/telemetry' ;
3+ import { shutdownGlobalTelemetry , startGlobalTelemetry } from '../src/telemetry/index.js ' ;
44
55// Even in testing, this needs to run first so that the instrumentation
66// is loaded BEFORE express is loaded.
@@ -11,5 +11,5 @@ beforeAll(async () => {
1111} ) ;
1212
1313afterAll ( async ( ) => {
14- await shutdownGlobalTelemetry ( ) ;
14+ await shutdownGlobalTelemetry ( ) . catch ( ( ) => undefined ) ;
1515} ) ;
Original file line number Diff line number Diff line change 7777 "@opentelemetry/instrumentation-generic-pool" : " ^0.51.0" ,
7878 "@opentelemetry/instrumentation-graphql" : " ^0.55.0" ,
7979 "@opentelemetry/instrumentation-http" : " ^0.207.0" ,
80- "@opentelemetry/instrumentation-ioredis" : " ^0.55.0" ,
8180 "@opentelemetry/instrumentation-net" : " ^0.51.0" ,
8281 "@opentelemetry/instrumentation-pg" : " ^0.60.0" ,
8382 "@opentelemetry/instrumentation-pino" : " ^0.54.0" ,
83+ "@opentelemetry/instrumentation-redis" : " ^0.56.0" ,
8484 "@opentelemetry/instrumentation-undici" : " ^0.18.0" ,
8585 "@opentelemetry/resource-detector-container" : " ^0.7.10" ,
8686 "@opentelemetry/resource-detector-gcp" : " ^0.42.0" ,
Original file line number Diff line number Diff line change @@ -380,7 +380,9 @@ export async function listen<SLocals extends AnyServiceLocals = ServiceLocals<Co
380380 shutdownInProgress = true ;
381381 app . locals . logger . info ( 'Shutdown requested' ) ;
382382 if ( app . locals . internalApp ) {
383- app . locals . internalApp . locals . server ?. close ( ) ;
383+ if ( app . locals . internalApp . locals . server ?. listening ) {
384+ app . locals . internalApp . locals . server ?. close ( ) ;
385+ }
384386 }
385387 shutdownApp ( app ) ;
386388 }
Original file line number Diff line number Diff line change 77 HttpInstrumentation ,
88 IgnoreIncomingRequestFunction ,
99} from '@opentelemetry/instrumentation-http' ;
10- import { IORedisInstrumentation } from '@opentelemetry/instrumentation-ioredis ' ;
10+ import { RedisInstrumentation } from '@opentelemetry/instrumentation-redis ' ;
1111import { NetInstrumentation } from '@opentelemetry/instrumentation-net' ;
1212import { GraphQLInstrumentation } from '@opentelemetry/instrumentation-graphql' ;
1313import { PgInstrumentation } from '@opentelemetry/instrumentation-pg' ;
@@ -20,7 +20,7 @@ const InstrumentationMap = {
2020 '@opentelemetry/instrumentation-graphql' : GraphQLInstrumentation ,
2121 '@opentelemetry/instrumentation-undici' : UndiciInstrumentation ,
2222 '@opentelemetry/instrumentation-generic-pool' : GenericPoolInstrumentation ,
23- '@opentelemetry/instrumentation-ioredis ' : IORedisInstrumentation ,
23+ '@opentelemetry/instrumentation-redis ' : RedisInstrumentation ,
2424 '@opentelemetry/instrumentation-net' : NetInstrumentation ,
2525 '@opentelemetry/instrumentation-pg' : PgInstrumentation ,
2626 '@opentelemetry/instrumentation-pino' : PinoInstrumentation ,
Original file line number Diff line number Diff line change @@ -806,10 +806,10 @@ __metadata:
806806 " @opentelemetry/instrumentation-generic-pool " : ^0.51.0
807807 " @opentelemetry/instrumentation-graphql " : ^0.55.0
808808 " @opentelemetry/instrumentation-http " : ^0.207.0
809- " @opentelemetry/instrumentation-ioredis " : ^0.55.0
810809 " @opentelemetry/instrumentation-net " : ^0.51.0
811810 " @opentelemetry/instrumentation-pg " : ^0.60.0
812811 " @opentelemetry/instrumentation-pino " : ^0.54.0
812+ " @opentelemetry/instrumentation-redis " : ^0.56.0
813813 " @opentelemetry/instrumentation-undici " : ^0.18.0
814814 " @opentelemetry/resource-detector-container " : ^0.7.10
815815 " @opentelemetry/resource-detector-gcp " : ^0.42.0
You can’t perform that action at this time.
0 commit comments