From f3cd81cfe5850c2b5ea0bc97cb03de7a74ea14ac Mon Sep 17 00:00:00 2001 From: Brian Phillips <28457+brianphillips@users.noreply.github.com> Date: Mon, 15 Jul 2024 16:39:28 -0500 Subject: [PATCH] feat(auto-instrumentations-node): enable auto-instrumentation for KafkaJS --- metapackages/auto-instrumentations-node/README.md | 1 + metapackages/auto-instrumentations-node/package.json | 1 + metapackages/auto-instrumentations-node/src/utils.ts | 2 ++ package-lock.json | 2 ++ 4 files changed, 6 insertions(+) diff --git a/metapackages/auto-instrumentations-node/README.md b/metapackages/auto-instrumentations-node/README.md index c32df7c437..0c71574801 100644 --- a/metapackages/auto-instrumentations-node/README.md +++ b/metapackages/auto-instrumentations-node/README.md @@ -173,6 +173,7 @@ registerInstrumentations({ - [@opentelemetry/instrumentation-hapi](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-hapi) - [@opentelemetry/instrumentation-http](https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-http) - [@opentelemetry/instrumentation-ioredis](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-ioredis) +- [@opentelemetry/instrumentation-kafkajs](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-kafkajs) - [@opentelemetry/instrumentation-knex](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-knex) - [@opentelemetry/instrumentation-koa](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-koa) - [@opentelemetry/instrumentation-lru-memoizer](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-lru-memoizer) diff --git a/metapackages/auto-instrumentations-node/package.json b/metapackages/auto-instrumentations-node/package.json index b8e634fc2d..c01ee442e3 100644 --- a/metapackages/auto-instrumentations-node/package.json +++ b/metapackages/auto-instrumentations-node/package.json @@ -68,6 +68,7 @@ "@opentelemetry/instrumentation-hapi": "^0.40.0", "@opentelemetry/instrumentation-http": "^0.52.0", "@opentelemetry/instrumentation-ioredis": "^0.42.0", + "@opentelemetry/instrumentation-kafkajs": "^0.2.0", "@opentelemetry/instrumentation-knex": "^0.38.0", "@opentelemetry/instrumentation-koa": "^0.42.0", "@opentelemetry/instrumentation-lru-memoizer": "^0.39.0", diff --git a/metapackages/auto-instrumentations-node/src/utils.ts b/metapackages/auto-instrumentations-node/src/utils.ts index c258dfc597..b0417115a5 100644 --- a/metapackages/auto-instrumentations-node/src/utils.ts +++ b/metapackages/auto-instrumentations-node/src/utils.ts @@ -35,6 +35,7 @@ import { GrpcInstrumentation } from '@opentelemetry/instrumentation-grpc'; import { HapiInstrumentation } from '@opentelemetry/instrumentation-hapi'; import { HttpInstrumentation } from '@opentelemetry/instrumentation-http'; import { IORedisInstrumentation } from '@opentelemetry/instrumentation-ioredis'; +import { KafkaJsInstrumentation } from '@opentelemetry/instrumentation-kafkajs'; import { KnexInstrumentation } from '@opentelemetry/instrumentation-knex'; import { KoaInstrumentation } from '@opentelemetry/instrumentation-koa'; import { LruMemoizerInstrumentation } from '@opentelemetry/instrumentation-lru-memoizer'; @@ -112,6 +113,7 @@ const InstrumentationMap = { '@opentelemetry/instrumentation-hapi': HapiInstrumentation, '@opentelemetry/instrumentation-http': HttpInstrumentation, '@opentelemetry/instrumentation-ioredis': IORedisInstrumentation, + '@opentelemetry/instrumentation-kafkajs': KafkaJsInstrumentation, '@opentelemetry/instrumentation-knex': KnexInstrumentation, '@opentelemetry/instrumentation-koa': KoaInstrumentation, '@opentelemetry/instrumentation-lru-memoizer': LruMemoizerInstrumentation, diff --git a/package-lock.json b/package-lock.json index 5c23d15b67..cdab8f5ca7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -305,6 +305,7 @@ "@opentelemetry/instrumentation-hapi": "^0.40.0", "@opentelemetry/instrumentation-http": "^0.52.0", "@opentelemetry/instrumentation-ioredis": "^0.42.0", + "@opentelemetry/instrumentation-kafkajs": "^0.2.0", "@opentelemetry/instrumentation-knex": "^0.38.0", "@opentelemetry/instrumentation-koa": "^0.42.0", "@opentelemetry/instrumentation-lru-memoizer": "^0.39.0", @@ -50388,6 +50389,7 @@ "@opentelemetry/instrumentation-hapi": "^0.40.0", "@opentelemetry/instrumentation-http": "^0.52.0", "@opentelemetry/instrumentation-ioredis": "^0.42.0", + "@opentelemetry/instrumentation-kafkajs": "^0.2.0", "@opentelemetry/instrumentation-knex": "^0.38.0", "@opentelemetry/instrumentation-koa": "^0.42.0", "@opentelemetry/instrumentation-lru-memoizer": "^0.39.0",