From 1c6e8b2531f5d7f65448c8f307e05c62282a2fb9 Mon Sep 17 00:00:00 2001 From: Amir Blum Date: Mon, 13 May 2024 12:10:57 +0300 Subject: [PATCH] fix(instrumentation)!: remove unused supportedVersions from Instrumentation interface (#4694) * chore: CHANGLOG * fix(instrumentation): remove unused property from instrumentations * chore: CHANGELOG --------- Co-authored-by: Marc Pichler --- experimental/CHANGELOG.md | 1 + .../opentelemetry-instrumentation/src/types.ts | 10 ---------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/experimental/CHANGELOG.md b/experimental/CHANGELOG.md index 2e6ac3fbc6..b21634b9b2 100644 --- a/experimental/CHANGELOG.md +++ b/experimental/CHANGELOG.md @@ -17,6 +17,7 @@ All notable changes to experimental packages in this project will be documented * (internal) OTLPExporterBrowserBase: `RequestType` has been replaced by a `ResponseType` type-argument * (internal) OTLPExporterNodeBase: `ServiceRequest` has been replaced by a `ServiceResponse` type-argument * (internal) the `@opentelemetry/otlp-exporter-proto-base` package has been removed, and will from now on be deprecated in `npm` +* fix(instrumentation)!: remove unused supportedVersions from Instrumentation interface [#4694](https://github.com/open-telemetry/opentelemetry-js/pull/4694) @blumamir ### :rocket: (Enhancement) diff --git a/experimental/packages/opentelemetry-instrumentation/src/types.ts b/experimental/packages/opentelemetry-instrumentation/src/types.ts index 3adc03921d..0445192de1 100644 --- a/experimental/packages/opentelemetry-instrumentation/src/types.ts +++ b/experimental/packages/opentelemetry-instrumentation/src/types.ts @@ -54,14 +54,6 @@ export interface Instrumentation< /** Method to get instrumentation config */ getConfig(): ConfigType; - - /** - * Contains all supported versions. - * All versions must be compatible with [semver](https://semver.org/spec/v2.0.0.html) format. - * If the version is not supported, we won't apply instrumentation patch (see `enable` method). - * If omitted, all versions of the module will be patched. - */ - supportedVersions?: string[]; } /** @@ -102,8 +94,6 @@ export interface InstrumentationModuleFile { /** Method to patch the instrumentation */ patch(moduleExports: unknown, moduleVersion?: string): unknown; - /** Method to patch the instrumentation */ - /** Method to unpatch the instrumentation */ unpatch(moduleExports?: unknown, moduleVersion?: string): void; }