Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 3 additions & 17 deletions nodejs/packages/layer/src/wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,7 @@ import {
import { AWSXRayPropagator } from '@opentelemetry/propagator-aws-xray';
import { AWSXRayLambdaPropagator } from '@opentelemetry/propagator-aws-xray-lambda';

const defaultInstrumentationList = [
'dns',
'express',
'graphql',
'grpc',
'hapi',
'http',
'ioredis',
'koa',
'mongodb',
'mysql',
'net',
'pg',
'redis',
];
const defaultInstrumentationList = ['dns', 'http', 'net'];

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

function getActiveInstumentations(): Set<string> {
function getActiveInstrumentations(): Set<string> {
let enabledInstrumentations: string[] = defaultInstrumentationList;
if (process.env.OTEL_NODE_ENABLED_INSTRUMENTATIONS) {
enabledInstrumentations =
Expand All @@ -124,7 +110,7 @@ function getActiveInstumentations(): Set<string> {

async function defaultConfigureInstrumentations() {
const instrumentations = [];
const activeInstrumentations = getActiveInstumentations();
const activeInstrumentations = getActiveInstrumentations();
if (activeInstrumentations.has('amqplib')) {
const { AmqplibInstrumentation } = await import(
'@opentelemetry/instrumentation-amqplib'
Expand Down