Skip to content
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

docs(instrumentation): better docs for supportedVersions option #4693

Merged
merged 11 commits into from
May 13, 2024

Conversation

blumamir
Copy link
Member

@blumamir blumamir commented May 10, 2024

This PR improves the documentation of the supportedVersions option on InstrumentationModuleDefinition and InstrumentationModuleFile:

  • explain that the array is ORed (one needs to match)
  • add guidelines on the syntax that is supported in a way that is easy to consume
  • document the effect of this function, copied from here
  • Add documentation about empty array behavior
  • Recommendation to bind the upper supported version to a major version to avoid breaking changes that we cannot anticipate, and guarantee support and stability.

This PR is only to document existing behavior, which is something we might want to consider. I think it is unhealthy for instrumentations to attempt patching any version by default when the array is empty, as it is never guaranteed that major version patches will work out of the box, and we don't want to harm user environment stability.

@blumamir blumamir requested a review from a team May 10, 2024 06:46
@blumamir
Copy link
Member Author

related: #4694

@pichlermarc pichlermarc merged commit 50bd460 into open-telemetry:main May 13, 2024
16 of 17 checks passed
Zirak pushed a commit to Zirak/opentelemetry-js that referenced this pull request Sep 14, 2024
…-telemetry#4693)

* docs(instrumentation): better docs for supportedVersions option

* docs: add recomundation to bound major version

* revert: Instrumentation class changes

* docs: add recommendation in both places

* docs: lint fix

* chore: CHANGLOG

* Update experimental/packages/opentelemetry-instrumentation/src/types.ts

* Update experimental/packages/opentelemetry-instrumentation/src/types.ts

---------

Co-authored-by: Marc Pichler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants