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
Copy Markdown

@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

Loading
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.

2 participants