Skip to content

Conversation

@chancancode
Copy link
Contributor

@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
@github-actions
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.

@codecov
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.96%. Comparing base (d9e757f) to head (5375076).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2654   +/-   ##
=======================================
  Coverage   90.96%   90.96%           
=======================================
  Files         172      172           
  Lines        8137     8137           
  Branches     1649     1649           
=======================================
  Hits         7402     7402           
  Misses        735      735           

Copy link
Member

@pichlermarc pichlermarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks 🙌

@github-actions github-actions bot added the pkg-status:unmaintained This package is unmaintained. Only bugfixes may be acceped until a new owner has been found. label Jan 21, 2025
@chancancode
Copy link
Contributor Author

chancancode commented Jan 21, 2025

@pichlermarc updated the branch from the UI here, let me know if you need a proper rebase

@pichlermarc pichlermarc merged commit b0f1999 into open-telemetry:main Jan 22, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has:sponsor This package or feature has a sponsor that has volunteered to review PRs and respond to questions pkg:instrumentation-aws-lambda pkg:instrumentation-mongodb pkg:instrumentation-mysql pkg:instrumentation-runtime-node pkg:instrumentation-undici pkg-status:unmaintained This package is unmaintained. Only bugfixes may be acceped until a new owner has been found.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[all] migrate from deprecated addMetricReader to MeterProvider constructor option

5 participants