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

Remove old global meter provider shutdown method #1412

Merged
merged 5 commits into from
Nov 29, 2023

Conversation

jtescher
Copy link
Member

Changes

This change removes the old global::shutdown_meter_provider method which is not part of the metrics API spec, and properly documents the SdkMeterProvider::shutdown method which is spec compliant.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@jtescher jtescher requested a review from a team November 29, 2023 16:47
Copy link

codecov bot commented Nov 29, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (897e70a) 57.3% compared to head (4e5d723) 57.3%.
Report is 1 commits behind head on main.

Files Patch % Lines
opentelemetry-sdk/src/attributes/set.rs 88.8% 2 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1412   +/-   ##
=====================================
  Coverage   57.3%   57.3%           
=====================================
  Files        146     146           
  Lines      18179   18184    +5     
=====================================
+ Hits       10422   10434   +12     
+ Misses      7757    7750    -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

opentelemetry/CHANGELOG.md Outdated Show resolved Hide resolved
@hdost hdost merged commit cd23ec2 into open-telemetry:main Nov 29, 2023
15 checks passed
@jtescher jtescher deleted the sdk-meter-provider-shutdown branch November 29, 2023 23:06
@Oliboy50
Copy link

Oliboy50 commented Mar 6, 2024

ℹ️ I opened a discussion here to find a valid replacement for when the MeterProvider is not easily accessible, since the removal of global::shutdown_meter_provider.

@lalitb
Copy link
Member

lalitb commented Mar 7, 2024

@Oliboy50 This issue is specific to the MetricsLayer provided by tracing-opentelemetry. And not while using the Otel Metrics API from this repo. Would you like to open a discussion within that repo. As I replied in our discussion:

I think your workaround should work (though good to validate it), but the solution should be for the MetricsLayer layer to take either instance of Meter, or the non-mutable reference to MeterProvider as an argument, as done for traces and logs. This will allow the MeterProvider instance to be used by the application for shutdown and flush calls.

@Oliboy50
Copy link

Oliboy50 commented Mar 7, 2024

@lalitb Following your advices, I opened a discussion there

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.

5 participants