Skip to content

chore(deps): bump @opentelemetry deps to v2.x#4933

Open
JoshElias wants to merge 3 commits intoelastic:mainfrom
uCiC-app:chore/update-opentelemetry-v2
Open

chore(deps): bump @opentelemetry deps to v2.x#4933
JoshElias wants to merge 3 commits intoelastic:mainfrom
uCiC-app:chore/update-opentelemetry-v2

Conversation

@JoshElias
Copy link

@JoshElias JoshElias commented Jan 26, 2026

Description

Update OpenTelemetry dependencies to v2.x and adapt code to the breaking API changes.

Summary

  • Update @opentelemetry/sdk-metrics from v1.x to v2.x
  • Update @opentelemetry/core to v2.x
  • Migrate from class-based aggregations to object-based AggregationOption API
  • Replace MeterProvider.addMetricReader() with constructor-based reader registration
  • Update test fixtures and examples to use v2.x API
  • Update documentation to reflect new API usage

Breaking Changes in OTel v2.x Addressed

  1. MeterProvider.addMetricReader() removed - Now pass readers via constructor options
  2. Aggregation classes removed (SumAggregation, LastValueAggregation, etc.) - Now use object-based { type: AggregationType.SUM } format
  3. Minimum Node.js version raised to ^18.19.0 || >=20.6.0 in OTel SDK

Checklist

  • Implement code
    - [ ] Add tests
    - [ ] Update TypeScript typings
  • Update documentation
    - [ ] Add release notes to docs/release-notes/index.md
  • Commit message follows commit guidelines

@JoshElias JoshElias requested a review from a team as a code owner January 26, 2026 16:43
@cla-checker-service
Copy link

cla-checker-service bot commented Jan 26, 2026

💚 CLA has been signed

@github-actions
Copy link

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@github-actions
Copy link

🔍 Preview links for changed docs

@JoshElias
Copy link
Author

❌ Author of the following commits did not sign a Contributor Agreement: 25a8bdf, 129899d, 274e44e

Please, read and sign the above mentioned agreement if you want to contribute to this project

I have since signed this.

@JoshElias
Copy link
Author

Happy to make any required changes to fit your standards!

@JoshElias
Copy link
Author

I just noticed that my auto formatter was a bit aggressive in the .md and .js files. I'll clean that noise out.

@JoshElias JoshElias changed the title chore(deps): update OpenTelemetry SDK to v2.x chore(deps): update @opentelemetry deps to v2.x Jan 27, 2026
@JoshElias JoshElias changed the title chore(deps): update @opentelemetry deps to v2.x chore(deps): bump @opentelemetry deps to v2.x Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant