Add `setMeterConfigurator` support to `MeterProvider`
Fixes #7051
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.
Codecov Report
:x: Patch coverage is 93.87755% with 3 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 90.04%. Comparing base (1c5dd50) to head (fbfc03c).
:warning: Report is 14 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ...try/sdk/metrics/internal/SdkMeterProviderUtil.java | 75.00% | 2 Missing :warning: |
| ...sdk/metrics/internal/state/EmptyMetricStorage.java | 0.00% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #7346 +/- ##
============================================
- Coverage 90.06% 90.04% -0.02%
- Complexity 7104 7114 +10
============================================
Files 805 805
Lines 21484 21517 +33
Branches 2093 2098 +5
============================================
+ Hits 19349 19376 +27
- Misses 1472 1476 +4
- Partials 663 665 +2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Hi @jack-berg, any comments on this? I think it's ready for a first round of review
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.
Hi @jack-berg, thanks for getting back on this. I agree that my solution is a bit invasive and some choices I took are arbitrary. Yours seems to be a good compromise. Let me know what I should do with this PR.
I see many tests commented, are they all failing/not compiling?
Let me know what I should do with this PR. I see many tests commented, are they all failing/not compiling?
I only commented those out to quickly see if the idea was feasible. I'm happy to uncomment / fix those tests and push them to this PR branch, or let you merge in my commit and fix up the tests. No preference here!
I ran the tests and some of them are failing, I'll try to fix them
I ran the tests and some of them are failing, I'll try to fix them
What's the status on this?
Hi @jkwatson, I'm a bit swamped. Somebody else can take it, otherwise I'll get back to this when I have some more time.
I'll pick this up and push commits to this PR if you don't mind @fandreuz
Thank you for your contribution @fandreuz! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey.