Skip to content

Add setMeterConfigurator support to MeterProvider #7346

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

Open
wants to merge 34 commits into
base: main
Choose a base branch
from

Conversation

fandreuz
Copy link
Contributor

Fixes #7051

@fandreuz fandreuz requested a review from a team as a code owner May 12, 2025 22:27
@fandreuz
Copy link
Contributor Author

I need to add a bunch more tests, I just wanted to check in to see if the approach is sound. The idea is to have a sort of aggregatorHolder for all storage types, which can be swapped with a DropAggregator according to the current state of the SdkMeter. The complexity lies in how to do this without having partial updates which may result in unexpected recordings.

Copy link

codecov bot commented May 16, 2025

Codecov Report

Attention: Patch coverage is 90.00000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 89.89%. Comparing base (cc7d085) to head (7ab9b3a).

Files with missing lines Patch % Lines
...nternal/state/DefaultSynchronousMetricStorage.java 90.62% 1 Missing and 2 partials ⚠️
...try/sdk/metrics/internal/SdkMeterProviderUtil.java 75.00% 2 Missing ⚠️
...rics/internal/state/AsynchronousMetricStorage.java 87.50% 0 Missing and 1 partial ⚠️
...sdk/metrics/internal/state/EmptyMetricStorage.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7346      +/-   ##
============================================
+ Coverage     89.87%   89.89%   +0.01%     
- Complexity     6899     6917      +18     
============================================
  Files           786      786              
  Lines         20793    20833      +40     
  Branches       2026     2031       +5     
============================================
+ Hits          18687    18727      +40     
+ Misses         1465     1462       -3     
- Partials        641      644       +3     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…l/state/DefaultSynchronousMetricStorage.java
@fandreuz
Copy link
Contributor Author

Hi @jack-berg, any comments on this? I think it's ready for a first round of review

@jack-berg
Copy link
Member

Hey @fandreuz - sorry for the delay. I'm swamped with internal stuff right now. Trying to get in a spot to be able to spend more time doing code reviews for otel next week.

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.

Add set{Signal}Configurator support to LoggerProvider, MeterProvider
2 participants