From afab5805ac3627066f252a1afc9e2c692e2c1feb Mon Sep 17 00:00:00 2001 From: warre Date: Tue, 4 Mar 2025 19:03:05 +0100 Subject: [PATCH 1/2] Remove non-generic instrumentations from the default instrumentation list --- nodejs/packages/layer/src/wrapper.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/nodejs/packages/layer/src/wrapper.ts b/nodejs/packages/layer/src/wrapper.ts index 39c8e82d26..664088bab8 100644 --- a/nodejs/packages/layer/src/wrapper.ts +++ b/nodejs/packages/layer/src/wrapper.ts @@ -49,18 +49,8 @@ import { AWSXRayLambdaPropagator } from '@opentelemetry/propagator-aws-xray-lamb const defaultInstrumentationList = [ 'dns', - 'express', - 'graphql', - 'grpc', - 'hapi', 'http', - 'ioredis', - 'koa', - 'mongodb', - 'mysql', 'net', - 'pg', - 'redis', ]; const propagatorMap = new Map TextMapPropagator>([ From 1ad32c1d2960e68f04760371619b26771db0cace Mon Sep 17 00:00:00 2001 From: warre Date: Thu, 4 Dec 2025 18:16:47 +0100 Subject: [PATCH 2/2] fix formatting and typo --- nodejs/packages/layer/src/wrapper.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/nodejs/packages/layer/src/wrapper.ts b/nodejs/packages/layer/src/wrapper.ts index 664088bab8..cead041ed8 100644 --- a/nodejs/packages/layer/src/wrapper.ts +++ b/nodejs/packages/layer/src/wrapper.ts @@ -47,11 +47,7 @@ import { import { AWSXRayPropagator } from '@opentelemetry/propagator-aws-xray'; import { AWSXRayLambdaPropagator } from '@opentelemetry/propagator-aws-xray-lambda'; -const defaultInstrumentationList = [ - 'dns', - 'http', - 'net', -]; +const defaultInstrumentationList = ['dns', 'http', 'net']; const propagatorMap = new Map TextMapPropagator>([ ['tracecontext', () => new W3CTraceContextPropagator()], @@ -93,7 +89,7 @@ declare global { function configureLoggerProvider(loggerProvider: unknown): void; } -function getActiveInstumentations(): Set { +function getActiveInstrumentations(): Set { let enabledInstrumentations: string[] = defaultInstrumentationList; if (process.env.OTEL_NODE_ENABLED_INSTRUMENTATIONS) { enabledInstrumentations = @@ -114,7 +110,7 @@ function getActiveInstumentations(): Set { async function defaultConfigureInstrumentations() { const instrumentations = []; - const activeInstrumentations = getActiveInstumentations(); + const activeInstrumentations = getActiveInstrumentations(); if (activeInstrumentations.has('amqplib')) { const { AmqplibInstrumentation } = await import( '@opentelemetry/instrumentation-amqplib'