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

refactor: migrate away from deprecated addMetricReader for SDK 2.0 #2654

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chancancode
Copy link

@chancancode chancancode commented Jan 16, 2025

This migrates from the deprecated addMetricReader method to the constructor option in preparation for the upcoming SDK 2.0 release.

This PR migrates all usages in the entire repository instead of per-package, since there aren't that many total occurrences and they are all in tests and example code. There are no user-facing changes, so I also didn't think there's anything useful to say in the CHANGELOG here.

Fixes #2646 (cc @pichlermarc @trentm)

This migrates from the deprecated `addMetricReader` method to the
constructor option in preparation for the upcoming SDK 2.0 release.

All usages are in tests and example code, there are no user-facing
changes.

Fixes open-telemetry#2646
Copy link
Contributor

This package does not have an assigned component owner and is considered unmaintained. As such this package is in feature-freeze and this PR will be closed with 14 days unless a new owner or a sponsor (a member of @open-telemetry/javascript-approvers) for the feature is found. It is the responsibility of the author to find a sponsor for this feature.
Are you familiar with this package? Consider becoming a component owner.

@pichlermarc pichlermarc changed the title fix(*): migrate away from deprecated addMetricReader for SDK 2.0 refactor: migrate away from deprecated addMetricReader for SDK 2.0 Jan 17, 2025
@pichlermarc pichlermarc added has:sponsor This package or feature has a sponsor that has volunteered to review PRs and respond to questions and removed pkg-status:unmaintained This package is unmaintained. Only bugfixes may be acceped until a new owner has been found. pkg-status:unmaintained:autoclose-scheduled labels Jan 17, 2025
@pichlermarc
Copy link
Member

I'll sponsor this.

Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.78%. Comparing base (e57f3e4) to head (f3bbbb0).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2654      +/-   ##
==========================================
- Coverage   90.79%   90.78%   -0.02%     
==========================================
  Files         169      169              
  Lines        8061     8061              
  Branches     1646     1646              
==========================================
- Hits         7319     7318       -1     
- Misses        742      743       +1     

see 1 file with indirect coverage changes

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.

[all] migrate from deprecated addMetricReader to MeterProvider constructor option
5 participants