Skip to content

Commit 7585d08

Browse files
wpessersmaxday
andauthored
feat(nodejs): remove non-generic instrumentations from defaults (#1734)
* Remove non-generic instrumentations from the default instrumentation list * fix formatting and typo --------- Co-authored-by: Maxime David <maxday@amazon.com>
1 parent f06d693 commit 7585d08

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

nodejs/packages/layer/src/wrapper.ts

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,7 @@ import {
4747
import { AWSXRayPropagator } from '@opentelemetry/propagator-aws-xray';
4848
import { AWSXRayLambdaPropagator } from '@opentelemetry/propagator-aws-xray-lambda';
4949

50-
const defaultInstrumentationList = [
51-
'dns',
52-
'express',
53-
'graphql',
54-
'grpc',
55-
'hapi',
56-
'http',
57-
'ioredis',
58-
'koa',
59-
'mongodb',
60-
'mysql',
61-
'net',
62-
'pg',
63-
'redis',
64-
];
50+
const defaultInstrumentationList = ['dns', 'http', 'net'];
6551

6652
const propagatorMap = new Map<string, () => TextMapPropagator>([
6753
['tracecontext', () => new W3CTraceContextPropagator()],
@@ -103,7 +89,7 @@ declare global {
10389
function configureLoggerProvider(loggerProvider: unknown): void;
10490
}
10591

106-
function getActiveInstumentations(): Set<string> {
92+
function getActiveInstrumentations(): Set<string> {
10793
let enabledInstrumentations: string[] = defaultInstrumentationList;
10894
if (process.env.OTEL_NODE_ENABLED_INSTRUMENTATIONS) {
10995
enabledInstrumentations =
@@ -124,7 +110,7 @@ function getActiveInstumentations(): Set<string> {
124110

125111
async function defaultConfigureInstrumentations() {
126112
const instrumentations = [];
127-
const activeInstrumentations = getActiveInstumentations();
113+
const activeInstrumentations = getActiveInstrumentations();
128114
if (activeInstrumentations.has('amqplib')) {
129115
const { AmqplibInstrumentation } = await import(
130116
'@opentelemetry/instrumentation-amqplib'

0 commit comments

Comments
 (0)