-
Notifications
You must be signed in to change notification settings - Fork 821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(instrumentation)!: remove unused supportedVersions from Instrumentation interface #4694
fix(instrumentation)!: remove unused supportedVersions from Instrumentation interface #4694
Conversation
I wonder if this is considered breaking change, as the property was never actually used, but it is part of a public interface therefore someone might have used it for any reason. very unlikely but possible. |
related #4693 |
@@ -102,8 +94,6 @@ export interface InstrumentationModuleFile { | |||
/** Method to patch the instrumentation */ | |||
patch(moduleExports: unknown, moduleVersion?: string): unknown; | |||
|
|||
/** Method to patch the instrumentation */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just a cleanup i spotted along the way
I'd consider it breaking but I think it's a pretty acceptable change |
…tation interface (open-telemetry#4694) * chore: CHANGLOG * fix(instrumentation): remove unused property from instrumentations * chore: CHANGELOG --------- Co-authored-by: Marc Pichler <[email protected]>
The Instrumentation interface in the
@opentelemetry/instrumentation
class, contains a propertysupportedVersions?: string[]
which is not used anywhere, not in the package itself or by any contrib instrumentation:It has no effect on anything really, just a property which downstream interface consumers can reference, and it is not set anywhere.
There exists 2 other configurations for
supportedVersions
here and here which are being used.My investigation leads me to #1540 which added it to the interface but never used it. It uses the
supportedVersions
on eachInstrumentationModuleDefinition
, but the one in theInstrumentation
interface was never utilized.The comment on this property is also misleading and references
(see
enablemethod)
, but this function uses the other 2supporetedVersions
definitions onInstrumentationModuleFile
andInstrumentationModuleDefinition
but not the one which is commented.Therefore, I think it is safe to remove it as a cleanup