diff --git a/knip.jsonc b/knip.jsonc new file mode 100644 index 0000000000..9f04c04017 --- /dev/null +++ b/knip.jsonc @@ -0,0 +1,11 @@ +// https://knip.dev/reference/configuration +{ + "$schema": "https://unpkg.com/knip@5/schema-jsonc.json", + "workspaces": { + "metapackages/auto-instrumentations-node": { + // Ensure register.ts is considered an entry-point (the `!` is to be + // included with the `--production` flag). + "entry": "src/register.ts!" + } + } +} diff --git a/package-lock.json b/package-lock.json index 0b09c3f069..2d5a6f13ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9937,22 +9937,11 @@ "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, - "node_modules/@opentelemetry/context-zone": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-zone/-/context-zone-1.27.0.tgz", - "integrity": "sha512-8lg/QKHNS8zGH5YPpenqXoA7L4pFPvGgxKFBAKoPvLx378posut7yXDl4XA10+yw2QRwIwMDBJ/8d6cOQ9G00Q==", - "dependencies": { - "@opentelemetry/context-zone-peer-dep": "1.27.0", - "zone.js": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^0.14.0" - }, - "engines": { - "node": ">=14" - } - }, "node_modules/@opentelemetry/context-zone-peer-dep": { "version": "1.27.0", "resolved": "https://registry.npmjs.org/@opentelemetry/context-zone-peer-dep/-/context-zone-peer-dep-1.27.0.tgz", "integrity": "sha512-gVeOOpqnLgP51F0EJGHeoAJmAHxXXroT1Tk2WVnMf/22jTiAunYzFFsMaqmcH8mNqjTYBLJb28Rz0tInO7uClg==", + "dev": true, "engines": { "node": ">=14" }, @@ -36323,11 +36312,11 @@ "version": "0.35.4", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/sdk-metrics": "^1.8.0", "systeminformation": "5.22.9" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", + "@opentelemetry/sdk-metrics": "^1.8.0", "@types/mocha": "8.2.3", "@types/node": "18.18.14", "@types/sinon": "10.0.20", @@ -36635,7 +36624,9 @@ "@opentelemetry/core": "^1.0.0", "@opentelemetry/exporter-jaeger": "^1.3.1", "@opentelemetry/instrumentation": "^0.54.0", + "@opentelemetry/otlp-transformer": "^0.54.0", "@opentelemetry/resources": "^1.8.0", + "@opentelemetry/sdk-metrics": "^1.27.0", "@opentelemetry/sdk-node": "^0.54.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", @@ -36756,6 +36747,7 @@ }, "devDependencies": { "@cucumber/cucumber": "^9.0.0", + "@cucumber/messages": "^22.0.0", "@opentelemetry/api": "^1.0.0", "@opentelemetry/core": "^1.3.1", "@opentelemetry/sdk-trace-base": "^1.3.1", @@ -37468,7 +37460,6 @@ "dependencies": { "@opentelemetry/instrumentation": "^0.54.0", "@opentelemetry/propagator-aws-xray": "^1.3.1", - "@opentelemetry/resources": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.27.0", "@types/aws-lambda": "8.10.143" }, @@ -37694,8 +37685,7 @@ "version": "0.39.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/instrumentation": "^0.54.0", - "semver": "^7.5.4" + "@opentelemetry/instrumentation": "^0.54.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", @@ -38100,13 +38090,13 @@ "license": "Apache-2.0", "dependencies": { "@opentelemetry/instrumentation": "^0.54.0", - "@opentelemetry/sdk-metrics": "^1.9.1", "@opentelemetry/semantic-conventions": "^1.27.0" }, "devDependencies": { "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", "@opentelemetry/contrib-test-utils": "^0.41.0", + "@opentelemetry/sdk-metrics": "^1.9.1", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/bson": "4.0.5", @@ -38794,7 +38784,6 @@ "dependencies": { "@opentelemetry/core": "^1.8.0", "@opentelemetry/instrumentation": "^0.54.0", - "@opentelemetry/sdk-trace-base": "^1.0.0", "@opentelemetry/sdk-trace-web": "^1.15.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, @@ -38802,6 +38791,7 @@ "@babel/core": "7.22.17", "@jsdevtools/coverage-istanbul-loader": "3.0.5", "@opentelemetry/api": "^1.3.0", + "@opentelemetry/sdk-trace-base": "^1.0.0", "@rollup/plugin-commonjs": "^26.0.0", "@rollup/plugin-node-resolve": "^15.2.3", "@types/chai": "^4.3.10", @@ -38843,14 +38833,14 @@ "license": "Apache-2.0", "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.54.0", - "@opentelemetry/sdk-trace-web": "^1.8.0" + "@opentelemetry/instrumentation": "^0.54.0" }, "devDependencies": { "@babel/core": "7.24.6", "@babel/preset-env": "7.24.6", "@opentelemetry/api": "^1.3.0", "@opentelemetry/sdk-trace-base": "^1.8.0", + "@opentelemetry/sdk-trace-web": "^1.8.0", "@types/mocha": "10.0.6", "@types/node": "18.18.14", "@types/sinon": "10.0.20", @@ -39200,10 +39190,7 @@ "version": "0.31.0", "license": "Apache-2.0", "dependencies": { - "@opentelemetry/context-zone": "^1.0.0", "@opentelemetry/core": "^1.0.0", - "@opentelemetry/sdk-trace-base": "^1.0.0", - "@opentelemetry/sdk-trace-web": "^1.0.0", "shimmer": "^1.2.1" }, "devDependencies": { @@ -39211,6 +39198,8 @@ "@babel/preset-env": "7.24.6", "@opentelemetry/api": "^1.0.0", "@opentelemetry/propagator-b3": "^1.26.0", + "@opentelemetry/sdk-trace-base": "^1.0.0", + "@opentelemetry/sdk-trace-web": "^1.0.0", "@types/mocha": "10.0.6", "@types/node": "18.18.14", "@types/react": "17.0.80", @@ -47561,19 +47550,11 @@ "integrity": "sha512-CdZ3qmHCwNhFAzjTgHqrDQ44Qxcpz43cVxZRhOs+Ns/79ug+Mr84Bkb626bkJLkA3+BLimA5YAEVRlJC6pFb7g==", "requires": {} }, - "@opentelemetry/context-zone": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-zone/-/context-zone-1.27.0.tgz", - "integrity": "sha512-8lg/QKHNS8zGH5YPpenqXoA7L4pFPvGgxKFBAKoPvLx378posut7yXDl4XA10+yw2QRwIwMDBJ/8d6cOQ9G00Q==", - "requires": { - "@opentelemetry/context-zone-peer-dep": "1.27.0", - "zone.js": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^0.14.0" - } - }, "@opentelemetry/context-zone-peer-dep": { "version": "1.27.0", "resolved": "https://registry.npmjs.org/@opentelemetry/context-zone-peer-dep/-/context-zone-peer-dep-1.27.0.tgz", "integrity": "sha512-gVeOOpqnLgP51F0EJGHeoAJmAHxXXroT1Tk2WVnMf/22jTiAunYzFFsMaqmcH8mNqjTYBLJb28Rz0tInO7uClg==", + "dev": true, "requires": {} }, "@opentelemetry/contrib-test-utils": { @@ -47583,7 +47564,9 @@ "@opentelemetry/core": "^1.0.0", "@opentelemetry/exporter-jaeger": "^1.3.1", "@opentelemetry/instrumentation": "^0.54.0", + "@opentelemetry/otlp-transformer": "^0.54.0", "@opentelemetry/resources": "^1.8.0", + "@opentelemetry/sdk-metrics": "^1.27.0", "@opentelemetry/sdk-node": "^0.54.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", @@ -47946,7 +47929,6 @@ "@opentelemetry/core": "^1.8.0", "@opentelemetry/instrumentation": "^0.54.0", "@opentelemetry/propagator-aws-xray": "^1.3.1", - "@opentelemetry/resources": "^1.8.0", "@opentelemetry/sdk-metrics": "^1.8.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", @@ -48131,6 +48113,7 @@ "version": "file:plugins/node/instrumentation-cucumber", "requires": { "@cucumber/cucumber": "^9.0.0", + "@cucumber/messages": "^22.0.0", "@opentelemetry/api": "^1.0.0", "@opentelemetry/core": "^1.3.1", "@opentelemetry/instrumentation": "^0.54.0", @@ -48192,7 +48175,6 @@ "@types/sinon": "10.0.20", "nyc": "15.1.0", "rimraf": "5.0.10", - "semver": "^7.5.4", "sinon": "15.2.0", "typescript": "4.4.4" }, @@ -49945,7 +49927,6 @@ "@babel/core": "7.24.6", "@babel/preset-env": "7.24.6", "@opentelemetry/api": "^1.0.0", - "@opentelemetry/context-zone": "^1.0.0", "@opentelemetry/core": "^1.0.0", "@opentelemetry/propagator-b3": "^1.26.0", "@opentelemetry/sdk-trace-base": "^1.0.0", diff --git a/package.json b/package.json index 5c172e4eec..c205e8dcfe 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,9 @@ "test-all-versions": "npm run --if-present --workspaces test-all-versions", "bump": "lerna publish", "changelog": "lerna-changelog", - "lint": "lerna run lint && npm run lint:readme && npm run lint:markdown", + "lint": "lerna run lint && npm run lint:deps && npm run lint:readme && npm run lint:markdown", "lint:fix": "lerna run lint:fix && npm run lint:markdown:fix", + "lint:deps": "npx --yes knip@5.33.3 --dependencies --production --tags=-knipignore", "lint:examples": "eslint ./examples/**/*.js", "lint:examples:fix": "eslint ./examples/**/*.js --fix", "lint:markdown": "markdownlint-cli2 $(git ls-files '*.md')", diff --git a/packages/opentelemetry-host-metrics/package.json b/packages/opentelemetry-host-metrics/package.json index bc3f67bc63..c3a75e5e3a 100644 --- a/packages/opentelemetry-host-metrics/package.json +++ b/packages/opentelemetry-host-metrics/package.json @@ -44,6 +44,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.3.0", + "@opentelemetry/sdk-metrics": "^1.8.0", "@types/mocha": "8.2.3", "@types/node": "18.18.14", "@types/sinon": "10.0.20", @@ -53,7 +54,6 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/sdk-metrics": "^1.8.0", "systeminformation": "5.22.9" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/opentelemetry-host-metrics#readme" diff --git a/packages/opentelemetry-host-metrics/src/BaseMetrics.ts b/packages/opentelemetry-host-metrics/src/BaseMetrics.ts index 389a695544..ff39b8475f 100644 --- a/packages/opentelemetry-host-metrics/src/BaseMetrics.ts +++ b/packages/opentelemetry-host-metrics/src/BaseMetrics.ts @@ -16,6 +16,7 @@ import { Meter, MeterProvider, diag, metrics } from '@opentelemetry/api'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; /** diff --git a/packages/opentelemetry-test-utils/package.json b/packages/opentelemetry-test-utils/package.json index cfb830edd4..083b9d6526 100644 --- a/packages/opentelemetry-test-utils/package.json +++ b/packages/opentelemetry-test-utils/package.json @@ -47,7 +47,9 @@ "@opentelemetry/core": "^1.0.0", "@opentelemetry/exporter-jaeger": "^1.3.1", "@opentelemetry/instrumentation": "^0.54.0", + "@opentelemetry/otlp-transformer": "^0.54.0", "@opentelemetry/resources": "^1.8.0", + "@opentelemetry/sdk-metrics": "^1.27.0", "@opentelemetry/sdk-node": "^0.54.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", diff --git a/packages/winston-transport/src/OpenTelemetryTransportV3.ts b/packages/winston-transport/src/OpenTelemetryTransportV3.ts index e3a93b1b57..e24c29840e 100644 --- a/packages/winston-transport/src/OpenTelemetryTransportV3.ts +++ b/packages/winston-transport/src/OpenTelemetryTransportV3.ts @@ -16,6 +16,7 @@ import { Logger, logs } from '@opentelemetry/api-logs'; import TransportStream = require('winston-transport'); +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { emitLogRecord } from './utils'; diff --git a/plugins/node/instrumentation-amqplib/src/amqplib.ts b/plugins/node/instrumentation-amqplib/src/amqplib.ts index 519bf056f1..bcdf9c7acb 100644 --- a/plugins/node/instrumentation-amqplib/src/amqplib.ts +++ b/plugins/node/instrumentation-amqplib/src/amqplib.ts @@ -74,6 +74,7 @@ import { normalizeExchange, unmarkConfirmChannelTracing, } from './utils'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; const supportedVersions = ['>=0.5.5 <1']; diff --git a/plugins/node/instrumentation-cucumber/package.json b/plugins/node/instrumentation-cucumber/package.json index f660fcd36d..36612a66d2 100644 --- a/plugins/node/instrumentation-cucumber/package.json +++ b/plugins/node/instrumentation-cucumber/package.json @@ -45,6 +45,7 @@ }, "devDependencies": { "@cucumber/cucumber": "^9.0.0", + "@cucumber/messages": "^22.0.0", "@opentelemetry/api": "^1.0.0", "@opentelemetry/core": "^1.3.1", "@opentelemetry/sdk-trace-base": "^1.3.1", diff --git a/plugins/node/instrumentation-cucumber/src/instrumentation.ts b/plugins/node/instrumentation-cucumber/src/instrumentation.ts index 0f4bfd5518..62341ad990 100644 --- a/plugins/node/instrumentation-cucumber/src/instrumentation.ts +++ b/plugins/node/instrumentation-cucumber/src/instrumentation.ts @@ -38,6 +38,7 @@ import type { } from '@cucumber/cucumber/lib/support_code_library_builder/types'; import { AttributeNames, CucumberInstrumentationConfig } from './types'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; const hooks = ['Before', 'BeforeStep', 'AfterStep', 'After'] as const; diff --git a/plugins/node/instrumentation-dataloader/src/instrumentation.ts b/plugins/node/instrumentation-dataloader/src/instrumentation.ts index 53bc18a6b2..21a192484f 100644 --- a/plugins/node/instrumentation-dataloader/src/instrumentation.ts +++ b/plugins/node/instrumentation-dataloader/src/instrumentation.ts @@ -27,6 +27,7 @@ import { SpanKind, } from '@opentelemetry/api'; import { DataloaderInstrumentationConfig } from './types'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import type * as Dataloader from 'dataloader'; diff --git a/plugins/node/instrumentation-fs/src/instrumentation.ts b/plugins/node/instrumentation-fs/src/instrumentation.ts index cd2f8306dc..9976af4ba1 100644 --- a/plugins/node/instrumentation-fs/src/instrumentation.ts +++ b/plugins/node/instrumentation-fs/src/instrumentation.ts @@ -21,6 +21,7 @@ import { InstrumentationNodeModuleDefinition, isWrapped, } from '@opentelemetry/instrumentation'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { CALLBACK_FUNCTIONS, diff --git a/plugins/node/instrumentation-kafkajs/src/instrumentation.ts b/plugins/node/instrumentation-kafkajs/src/instrumentation.ts index 25bc9aad70..1dacb4351c 100644 --- a/plugins/node/instrumentation-kafkajs/src/instrumentation.ts +++ b/plugins/node/instrumentation-kafkajs/src/instrumentation.ts @@ -44,6 +44,7 @@ import type { Consumer, } from 'kafkajs'; import { KafkaJsInstrumentationConfig } from './types'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { bufferTextMapGetter } from './propagator'; import { diff --git a/plugins/node/instrumentation-lru-memoizer/src/instrumentation.ts b/plugins/node/instrumentation-lru-memoizer/src/instrumentation.ts index bfb7465e62..a48b4c403f 100644 --- a/plugins/node/instrumentation-lru-memoizer/src/instrumentation.ts +++ b/plugins/node/instrumentation-lru-memoizer/src/instrumentation.ts @@ -20,6 +20,7 @@ import { InstrumentationConfig, InstrumentationNodeModuleDefinition, } from '@opentelemetry/instrumentation'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; export class LruMemoizerInstrumentation extends InstrumentationBase { diff --git a/plugins/node/instrumentation-mongoose/src/mongoose.ts b/plugins/node/instrumentation-mongoose/src/mongoose.ts index e73dee78c2..30fbddd661 100644 --- a/plugins/node/instrumentation-mongoose/src/mongoose.ts +++ b/plugins/node/instrumentation-mongoose/src/mongoose.ts @@ -27,6 +27,7 @@ import { InstrumentationModuleDefinition, InstrumentationNodeModuleDefinition, } from '@opentelemetry/instrumentation'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { SEMATTRS_DB_OPERATION, diff --git a/plugins/node/instrumentation-runtime-node/src/instrumentation.ts b/plugins/node/instrumentation-runtime-node/src/instrumentation.ts index 3e80ae4280..ddc9a2f5b9 100644 --- a/plugins/node/instrumentation-runtime-node/src/instrumentation.ts +++ b/plugins/node/instrumentation-runtime-node/src/instrumentation.ts @@ -18,6 +18,7 @@ const { eventLoopUtilization } = performance; import { InstrumentationBase } from '@opentelemetry/instrumentation'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { RuntimeNodeInstrumentationConfig } from './types'; diff --git a/plugins/node/instrumentation-socket.io/src/socket.io.ts b/plugins/node/instrumentation-socket.io/src/socket.io.ts index 1edd6a9c39..d2b872dc9e 100644 --- a/plugins/node/instrumentation-socket.io/src/socket.io.ts +++ b/plugins/node/instrumentation-socket.io/src/socket.io.ts @@ -37,6 +37,7 @@ import { } from '@opentelemetry/semantic-conventions'; import { SocketIoInstrumentationConfig } from './types'; import { SocketIoInstrumentationAttributes } from './AttributeNames'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { extractRoomsAttributeValue, diff --git a/plugins/node/instrumentation-tedious/src/instrumentation.ts b/plugins/node/instrumentation-tedious/src/instrumentation.ts index 7313334193..adc328b8ed 100644 --- a/plugins/node/instrumentation-tedious/src/instrumentation.ts +++ b/plugins/node/instrumentation-tedious/src/instrumentation.ts @@ -34,6 +34,7 @@ import { import type * as tedious from 'tedious'; import { TediousInstrumentationConfig } from './types'; import { getSpanName, once } from './utils'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; const CURRENT_DATABASE = Symbol( diff --git a/plugins/node/instrumentation-undici/src/undici.ts b/plugins/node/instrumentation-undici/src/undici.ts index 1755b7417b..5a6799137f 100644 --- a/plugins/node/instrumentation-undici/src/undici.ts +++ b/plugins/node/instrumentation-undici/src/undici.ts @@ -34,6 +34,7 @@ import { ValueType, } from '@opentelemetry/api'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { diff --git a/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json b/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json index e93dca5ebb..8621c62678 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json +++ b/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json @@ -57,7 +57,6 @@ "dependencies": { "@opentelemetry/instrumentation": "^0.54.0", "@opentelemetry/propagator-aws-xray": "^1.3.1", - "@opentelemetry/resources": "^1.8.0", "@opentelemetry/semantic-conventions": "^1.27.0", "@types/aws-lambda": "8.10.143" }, diff --git a/plugins/node/opentelemetry-instrumentation-aws-lambda/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-aws-lambda/src/instrumentation.ts index 276ef63518..db25f2d77b 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-lambda/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-lambda/src/instrumentation.ts @@ -58,6 +58,7 @@ import { } from 'aws-lambda'; import { AwsLambdaInstrumentationConfig, EventContextExtractor } from './types'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { env } from 'process'; import { LambdaModule } from './internal-types'; diff --git a/plugins/node/opentelemetry-instrumentation-aws-sdk/src/aws-sdk.ts b/plugins/node/opentelemetry-instrumentation-aws-sdk/src/aws-sdk.ts index c8180d3def..a3040a15a9 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-sdk/src/aws-sdk.ts +++ b/plugins/node/opentelemetry-instrumentation-aws-sdk/src/aws-sdk.ts @@ -33,6 +33,7 @@ import { NormalizedRequest, NormalizedResponse, } from './types'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { InstrumentationBase, diff --git a/plugins/node/opentelemetry-instrumentation-bunyan/src/OpenTelemetryBunyanStream.ts b/plugins/node/opentelemetry-instrumentation-bunyan/src/OpenTelemetryBunyanStream.ts index c82f967372..4699dd353c 100644 --- a/plugins/node/opentelemetry-instrumentation-bunyan/src/OpenTelemetryBunyanStream.ts +++ b/plugins/node/opentelemetry-instrumentation-bunyan/src/OpenTelemetryBunyanStream.ts @@ -16,6 +16,7 @@ import { logs, SeverityNumber, Logger } from '@opentelemetry/api-logs'; import type { LogLevelString } from 'bunyan'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; const DEFAULT_INSTRUMENTATION_SCOPE_NAME = PACKAGE_NAME; diff --git a/plugins/node/opentelemetry-instrumentation-bunyan/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-bunyan/src/instrumentation.ts index 4bb9fb0b68..d51595b0b5 100644 --- a/plugins/node/opentelemetry-instrumentation-bunyan/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-bunyan/src/instrumentation.ts @@ -22,6 +22,7 @@ import { safeExecuteInTheMiddle, } from '@opentelemetry/instrumentation'; import { BunyanInstrumentationConfig } from './types'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { OpenTelemetryBunyanStream } from './OpenTelemetryBunyanStream'; import type * as BunyanLogger from 'bunyan'; diff --git a/plugins/node/opentelemetry-instrumentation-cassandra/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-cassandra/src/instrumentation.ts index d73e3b0253..3a65a0bd6a 100644 --- a/plugins/node/opentelemetry-instrumentation-cassandra/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-cassandra/src/instrumentation.ts @@ -39,6 +39,7 @@ import { SEMATTRS_NET_PEER_NAME, SEMATTRS_NET_PEER_PORT, } from '@opentelemetry/semantic-conventions'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { EventEmitter } from 'events'; import type * as CassandraDriver from 'cassandra-driver'; diff --git a/plugins/node/opentelemetry-instrumentation-connect/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-connect/src/instrumentation.ts index a57048b265..8d5ecb3f82 100644 --- a/plugins/node/opentelemetry-instrumentation-connect/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-connect/src/instrumentation.ts @@ -24,6 +24,7 @@ import { ConnectTypes, } from './enums/AttributeNames'; import { PatchedRequest, Use, UseArgs, UseArgs2 } from './internal-types'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { InstrumentationBase, diff --git a/plugins/node/opentelemetry-instrumentation-dns/package.json b/plugins/node/opentelemetry-instrumentation-dns/package.json index 574a9b0bc3..22a6145ffb 100644 --- a/plugins/node/opentelemetry-instrumentation-dns/package.json +++ b/plugins/node/opentelemetry-instrumentation-dns/package.json @@ -58,8 +58,7 @@ "typescript": "4.4.4" }, "dependencies": { - "@opentelemetry/instrumentation": "^0.54.0", - "semver": "^7.5.4" + "@opentelemetry/instrumentation": "^0.54.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-dns#readme" } diff --git a/plugins/node/opentelemetry-instrumentation-dns/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-dns/src/instrumentation.ts index a99051a502..ea01547840 100644 --- a/plugins/node/opentelemetry-instrumentation-dns/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-dns/src/instrumentation.ts @@ -27,6 +27,7 @@ import { import { AddressFamily } from './enums/AddressFamily'; import { DnsInstrumentationConfig } from './types'; import * as utils from './utils'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { LookupCallbackSignature, diff --git a/plugins/node/opentelemetry-instrumentation-express/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-express/src/instrumentation.ts index 155b63f494..2e283158b8 100644 --- a/plugins/node/opentelemetry-instrumentation-express/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-express/src/instrumentation.ts @@ -33,6 +33,7 @@ import { isLayerIgnored, storeLayerPath, } from './utils'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { InstrumentationBase, diff --git a/plugins/node/opentelemetry-instrumentation-fastify/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-fastify/src/instrumentation.ts index b03032d465..08df2aa533 100644 --- a/plugins/node/opentelemetry-instrumentation-fastify/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-fastify/src/instrumentation.ts @@ -41,6 +41,7 @@ import { safeExecuteInTheMiddleMaybePromise, startSpan, } from './utils'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; export const ANONYMOUS_NAME = 'anonymous'; diff --git a/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts index d6787f9d46..6b6ad90f81 100644 --- a/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts @@ -24,6 +24,7 @@ import { import type * as genericPool from 'generic-pool'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; const MODULE_NAME = 'generic-pool'; diff --git a/plugins/node/opentelemetry-instrumentation-graphql/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-graphql/src/instrumentation.ts index 1fc1bdf429..7c764099e5 100644 --- a/plugins/node/opentelemetry-instrumentation-graphql/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-graphql/src/instrumentation.ts @@ -48,6 +48,7 @@ import { wrapFields, } from './utils'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import * as api from '@opentelemetry/api'; import type { PromiseOrValue } from 'graphql/jsutils/PromiseOrValue'; diff --git a/plugins/node/opentelemetry-instrumentation-hapi/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-hapi/src/instrumentation.ts index 9951dac8ed..91bda4397e 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-hapi/src/instrumentation.ts @@ -24,6 +24,7 @@ import { } from '@opentelemetry/instrumentation'; import type * as Hapi from '@hapi/hapi'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { HapiComponentName, diff --git a/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts index 232d5d9952..daecaaa63b 100644 --- a/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-ioredis/src/instrumentation.ts @@ -33,6 +33,7 @@ import { import { safeExecuteInTheMiddle } from '@opentelemetry/instrumentation'; import { endSpan } from './utils'; import { defaultDbStatementSerializer } from '@opentelemetry/redis-common'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; const DEFAULT_CONFIG: IORedisInstrumentationConfig = { diff --git a/plugins/node/opentelemetry-instrumentation-knex/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-knex/src/instrumentation.ts index 191bf1522d..ca144b2751 100644 --- a/plugins/node/opentelemetry-instrumentation-knex/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-knex/src/instrumentation.ts @@ -15,6 +15,7 @@ */ import * as api from '@opentelemetry/api'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import * as constants from './constants'; import { diff --git a/plugins/node/opentelemetry-instrumentation-koa/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-koa/src/instrumentation.ts index 6dd6c86021..3d7eb864a4 100644 --- a/plugins/node/opentelemetry-instrumentation-koa/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-koa/src/instrumentation.ts @@ -24,6 +24,7 @@ import { import type * as koa from 'koa'; import { KoaLayerType, KoaInstrumentationConfig } from './types'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { getMiddlewareMetadata, isLayerIgnored } from './utils'; import { getRPCMetadata, RPCType } from '@opentelemetry/core'; diff --git a/plugins/node/opentelemetry-instrumentation-memcached/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-memcached/src/instrumentation.ts index bb54a99626..a8534265e8 100644 --- a/plugins/node/opentelemetry-instrumentation-memcached/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-memcached/src/instrumentation.ts @@ -29,6 +29,7 @@ import { } from '@opentelemetry/semantic-conventions'; import * as utils from './utils'; import { InstrumentationConfig } from './types'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; export class MemcachedInstrumentation extends InstrumentationBase { diff --git a/plugins/node/opentelemetry-instrumentation-mongodb/package.json b/plugins/node/opentelemetry-instrumentation-mongodb/package.json index 11ab4aaaeb..3d5493e3d3 100644 --- a/plugins/node/opentelemetry-instrumentation-mongodb/package.json +++ b/plugins/node/opentelemetry-instrumentation-mongodb/package.json @@ -52,6 +52,7 @@ "@opentelemetry/api": "^1.3.0", "@opentelemetry/context-async-hooks": "^1.8.0", "@opentelemetry/contrib-test-utils": "^0.41.0", + "@opentelemetry/sdk-metrics": "^1.9.1", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", "@types/bson": "4.0.5", @@ -65,7 +66,6 @@ }, "dependencies": { "@opentelemetry/instrumentation": "^0.54.0", - "@opentelemetry/sdk-metrics": "^1.9.1", "@opentelemetry/semantic-conventions": "^1.27.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-mongodb#readme" diff --git a/plugins/node/opentelemetry-instrumentation-mongodb/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-mongodb/src/instrumentation.ts index b257b24621..caaff5c550 100644 --- a/plugins/node/opentelemetry-instrumentation-mongodb/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-mongodb/src/instrumentation.ts @@ -51,6 +51,7 @@ import { V4ConnectionPool, } from './internal-types'; import { V4Connect, V4Session } from './internal-types'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { UpDownCounter } from '@opentelemetry/api'; diff --git a/plugins/node/opentelemetry-instrumentation-mysql/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-mysql/src/instrumentation.ts index bb7139b57e..7bf5863fe5 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-mysql/src/instrumentation.ts @@ -42,6 +42,7 @@ import { getSpanName, getPoolName, } from './utils'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { UpDownCounter, MeterProvider } from '@opentelemetry/api'; diff --git a/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts index 0c60c0f452..7557cf7a01 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-mysql2/src/instrumentation.ts @@ -35,6 +35,7 @@ import { getSpanName, once, } from './utils'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; type formatType = typeof mysqlTypes.format; diff --git a/plugins/node/opentelemetry-instrumentation-nestjs-core/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-nestjs-core/src/instrumentation.ts index 5bd5c20b10..edc7bc5d2f 100644 --- a/plugins/node/opentelemetry-instrumentation-nestjs-core/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-nestjs-core/src/instrumentation.ts @@ -25,6 +25,7 @@ import { import type { NestFactory } from '@nestjs/core/nest-factory.js'; import type { RouterExecutionContext } from '@nestjs/core/router/router-execution-context.js'; import type { Controller } from '@nestjs/common/interfaces'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { SEMATTRS_HTTP_METHOD, diff --git a/plugins/node/opentelemetry-instrumentation-net/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-net/src/instrumentation.ts index 567df7dee3..11ae9dbc9d 100644 --- a/plugins/node/opentelemetry-instrumentation-net/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-net/src/instrumentation.ts @@ -34,6 +34,7 @@ import { import { TLSAttributes } from './types'; import { NormalizedOptions, SocketEvent } from './internal-types'; import { getNormalizedArgs, IPC_TRANSPORT } from './utils'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { Socket } from 'net'; import { TLSSocket } from 'tls'; diff --git a/plugins/node/opentelemetry-instrumentation-pg/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-pg/src/instrumentation.ts index 856a21ab26..b123214fa5 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-pg/src/instrumentation.ts @@ -44,6 +44,7 @@ import { import { PgInstrumentationConfig } from './types'; import * as utils from './utils'; import { addSqlCommenterComment } from '@opentelemetry/sql-common'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { SpanNames } from './enums/SpanNames'; import { diff --git a/plugins/node/opentelemetry-instrumentation-pino/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-pino/src/instrumentation.ts index 8a33b69df3..ef16fdda40 100644 --- a/plugins/node/opentelemetry-instrumentation-pino/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-pino/src/instrumentation.ts @@ -27,6 +27,7 @@ import { safeExecuteInTheMiddle, } from '@opentelemetry/instrumentation'; import { PinoInstrumentationConfig } from './types'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { getTimeConverter, OTelPinoStream } from './log-sending-utils'; diff --git a/plugins/node/opentelemetry-instrumentation-pino/src/log-sending-utils.ts b/plugins/node/opentelemetry-instrumentation-pino/src/log-sending-utils.ts index f24cd20cd2..defb8d3685 100644 --- a/plugins/node/opentelemetry-instrumentation-pino/src/log-sending-utils.ts +++ b/plugins/node/opentelemetry-instrumentation-pino/src/log-sending-utils.ts @@ -17,6 +17,7 @@ import { Writable } from 'stream'; import { logs, Logger, SeverityNumber } from '@opentelemetry/api-logs'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { millisToHrTime } from '@opentelemetry/core'; diff --git a/plugins/node/opentelemetry-instrumentation-redis-4/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-redis-4/src/instrumentation.ts index b68a312a16..cbbbb0aab1 100644 --- a/plugins/node/opentelemetry-instrumentation-redis-4/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-redis-4/src/instrumentation.ts @@ -30,6 +30,7 @@ import { import { getClientAttributes } from './utils'; import { defaultDbStatementSerializer } from '@opentelemetry/redis-common'; import { RedisInstrumentationConfig } from './types'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { SEMATTRS_DB_STATEMENT } from '@opentelemetry/semantic-conventions'; import type { MultiErrorReply } from './internal-types'; diff --git a/plugins/node/opentelemetry-instrumentation-redis/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-redis/src/instrumentation.ts index 1911af1cdd..dd0960d533 100644 --- a/plugins/node/opentelemetry-instrumentation-redis/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-redis/src/instrumentation.ts @@ -25,6 +25,7 @@ import { getTracedInternalSendCommand, } from './utils'; import { RedisInstrumentationConfig } from './types'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; const DEFAULT_CONFIG: RedisInstrumentationConfig = { diff --git a/plugins/node/opentelemetry-instrumentation-restify/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-restify/src/instrumentation.ts index 81c4bc90c0..2a8a1b3d1b 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-restify/src/instrumentation.ts @@ -21,6 +21,7 @@ import * as api from '@opentelemetry/api'; import type { Server } from 'restify'; import { LayerType } from './types'; import { AttributeNames } from './enums/AttributeNames'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import * as constants from './constants'; import { diff --git a/plugins/node/opentelemetry-instrumentation-router/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-router/src/instrumentation.ts index 4e585b5c01..995bc6ec79 100644 --- a/plugins/node/opentelemetry-instrumentation-router/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-router/src/instrumentation.ts @@ -28,6 +28,7 @@ import * as http from 'http'; import type * as Router from 'router'; import * as types from './internal-types'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import * as constants from './constants'; import * as utils from './utils'; diff --git a/plugins/node/opentelemetry-instrumentation-winston/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-winston/src/instrumentation.ts index 96c83e245a..6eceec0526 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-winston/src/instrumentation.ts @@ -31,6 +31,7 @@ import type { Winston3LogMethod, Winston3Logger, } from './internal-types'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; const winston3Versions = ['>=3 <4']; diff --git a/plugins/web/opentelemetry-instrumentation-document-load/package.json b/plugins/web/opentelemetry-instrumentation-document-load/package.json index 678f2d49fd..15690dfc21 100644 --- a/plugins/web/opentelemetry-instrumentation-document-load/package.json +++ b/plugins/web/opentelemetry-instrumentation-document-load/package.json @@ -55,6 +55,7 @@ "@babel/core": "7.22.17", "@jsdevtools/coverage-istanbul-loader": "3.0.5", "@opentelemetry/api": "^1.3.0", + "@opentelemetry/sdk-trace-base": "^1.0.0", "@rollup/plugin-commonjs": "^26.0.0", "@rollup/plugin-node-resolve": "^15.2.3", "@types/chai": "^4.3.10", @@ -71,7 +72,6 @@ "dependencies": { "@opentelemetry/core": "^1.8.0", "@opentelemetry/instrumentation": "^0.54.0", - "@opentelemetry/sdk-trace-base": "^1.0.0", "@opentelemetry/sdk-trace-web": "^1.15.0", "@opentelemetry/semantic-conventions": "^1.27.0" }, diff --git a/plugins/web/opentelemetry-instrumentation-document-load/src/instrumentation.ts b/plugins/web/opentelemetry-instrumentation-document-load/src/instrumentation.ts index 7bdd78df0c..f2ae8f48ea 100644 --- a/plugins/web/opentelemetry-instrumentation-document-load/src/instrumentation.ts +++ b/plugins/web/opentelemetry-instrumentation-document-load/src/instrumentation.ts @@ -39,6 +39,7 @@ import { ResourceFetchCustomAttributeFunction, } from './types'; import { AttributeNames } from './enums/AttributeNames'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import { SEMATTRS_HTTP_URL, diff --git a/plugins/web/opentelemetry-instrumentation-long-task/package.json b/plugins/web/opentelemetry-instrumentation-long-task/package.json index b83d28dc00..db21d8cb68 100644 --- a/plugins/web/opentelemetry-instrumentation-long-task/package.json +++ b/plugins/web/opentelemetry-instrumentation-long-task/package.json @@ -53,6 +53,7 @@ "@babel/preset-env": "7.24.6", "@opentelemetry/api": "^1.3.0", "@opentelemetry/sdk-trace-base": "^1.8.0", + "@opentelemetry/sdk-trace-web": "^1.8.0", "@types/mocha": "10.0.6", "@types/node": "18.18.14", "@types/sinon": "10.0.20", @@ -79,8 +80,7 @@ }, "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.54.0", - "@opentelemetry/sdk-trace-web": "^1.8.0" + "@opentelemetry/instrumentation": "^0.54.0" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" diff --git a/plugins/web/opentelemetry-instrumentation-long-task/src/instrumentation.ts b/plugins/web/opentelemetry-instrumentation-long-task/src/instrumentation.ts index 1dc990eb5e..f00110b7f6 100644 --- a/plugins/web/opentelemetry-instrumentation-long-task/src/instrumentation.ts +++ b/plugins/web/opentelemetry-instrumentation-long-task/src/instrumentation.ts @@ -16,6 +16,7 @@ import { hrTime } from '@opentelemetry/core'; import { diag } from '@opentelemetry/api'; import { InstrumentationBase } from '@opentelemetry/instrumentation'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; import type { PerformanceLongTaskTiming, diff --git a/plugins/web/opentelemetry-instrumentation-user-interaction/src/instrumentation.ts b/plugins/web/opentelemetry-instrumentation-user-interaction/src/instrumentation.ts index 4bd38efbe7..c1b7ff4cad 100644 --- a/plugins/web/opentelemetry-instrumentation-user-interaction/src/instrumentation.ts +++ b/plugins/web/opentelemetry-instrumentation-user-interaction/src/instrumentation.ts @@ -34,6 +34,7 @@ import { WindowWithZone, ZoneTypeWithPrototype, } from './internal-types'; +/** @knipignore */ import { PACKAGE_NAME, PACKAGE_VERSION } from './version'; const ZONE_CONTEXT_KEY = 'OT_ZONE_CONTEXT'; diff --git a/plugins/web/opentelemetry-plugin-react-load/package.json b/plugins/web/opentelemetry-plugin-react-load/package.json index d4b90bce72..dcefedaf62 100644 --- a/plugins/web/opentelemetry-plugin-react-load/package.json +++ b/plugins/web/opentelemetry-plugin-react-load/package.json @@ -53,6 +53,8 @@ "@babel/preset-env": "7.24.6", "@opentelemetry/api": "^1.0.0", "@opentelemetry/propagator-b3": "^1.26.0", + "@opentelemetry/sdk-trace-base": "^1.0.0", + "@opentelemetry/sdk-trace-web": "^1.0.0", "@types/mocha": "10.0.6", "@types/node": "18.18.14", "@types/react": "17.0.80", @@ -86,10 +88,7 @@ "react": "^16.13.1 || ^17.0.0" }, "dependencies": { - "@opentelemetry/context-zone": "^1.0.0", "@opentelemetry/core": "^1.0.0", - "@opentelemetry/sdk-trace-base": "^1.0.0", - "@opentelemetry/sdk-trace-web": "^1.0.0", "shimmer": "^1.2.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/web/opentelemetry-plugin-react-load#readme" diff --git a/plugins/web/opentelemetry-plugin-react-load/src/BaseOpenTelemetryComponent.ts b/plugins/web/opentelemetry-plugin-react-load/src/BaseOpenTelemetryComponent.ts index fa7b007d0a..b3b7c9d926 100644 --- a/plugins/web/opentelemetry-plugin-react-load/src/BaseOpenTelemetryComponent.ts +++ b/plugins/web/opentelemetry-plugin-react-load/src/BaseOpenTelemetryComponent.ts @@ -19,6 +19,7 @@ import { isWrapped } from '@opentelemetry/core'; import * as shimmer from 'shimmer'; import { AttributeNames } from './enums/AttributeNames'; import * as React from 'react'; +/** @knipignore */ import { PACKAGE_VERSION } from './version'; import { RenderFunction,