Skip to content

Conversation

@jack-berg
Copy link
Member

I'm not completely satisfied with #7742.

Its awkward that a single implementation of ExemplarReservoir has to be responsible for both longs and double, and collecting longs and doubles. In actuality, because each aggregation handle has its own reservoir instance, a particular reservoir is only responsible for recording / collecting longs OR recording / collecting doubles.

This (optional) followup to #7742 teases ExemplarReservoir apart into DoubleExemplarReservoir and LongExemplarReservoir. It also introduces a new ExemplarReservoirFactory with two methods: createLongExemplarReservoir(), createDoubleExemplarReservoir(). This would be the interface that we would ultimately add to View for user configuration.

@jack-berg jack-berg requested a review from a team as a code owner October 14, 2025 17:07
@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

❌ Patch coverage is 94.20290% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.16%. Comparing base (6056b05) to head (2d2b22a).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
.../metrics/internal/aggregator/AggregatorHandle.java 76.00% 5 Missing and 1 partial ⚠️
...cs/internal/exemplar/ExemplarReservoirFactory.java 92.30% 1 Missing ⚠️
...try/sdk/metrics/internal/view/DropAggregation.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@ ## main #7758 +/- ## ============================================ - Coverage 90.18% 90.16% -0.03%  + Complexity 7196 7189 -7  ============================================ Files 814 814 Lines 21722 21730 +8 Branches 2125 2129 +4 ============================================ + Hits 19590 19592 +2  - Misses 1465 1469 +4  - Partials 667 669 +2 

☔ 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.
@jkwatson
Copy link
Contributor

I'm fine with this approach, too. I'll trust your judgement on which direction to go.

@jack-berg
Copy link
Member Author

I'm fine with this approach, too. I'll trust your judgement on which direction to go.

I prefer this. Fortunately, we actually don't need to rush to stabilize anything related to ExemplarReservoir since there is currently no user facing configuration available around this. For the immediate future, we just need to focus on ExemplarFilter, which will have a very limited public API surface area.

@jack-berg jack-berg merged commit a01288b into open-telemetry:main Oct 18, 2025
29 checks passed
the-clam pushed a commit to the-clam/opentelemetry-java that referenced this pull request Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants