Repository navigation
Count data points in OTLP metric exporter health metrics - #9016
goutamadwant wants to merge 4 commits into
Conversation
Pull request dashboard statusWaiting on reviewers · refreshed 2026-11-19 08:36 UTC Review the latest changes. Status above doesn't look right?
|
Give the HTTP and gRPC metric exporter builder fixtures one data point so their meter-provider tests retain meaningful nonzero assertions. Cover legacy and latest exporter instrumentation in both memory modes, including multi-point and empty exports, asynchronous success and failure, and subsequent exports. Assert that legacy seen/exported counters count data points and preserve their type and success attributes, with exported counts updated only after completion.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9016 +/- ##
============================================
+ Coverage 90.37% 90.53% +0.15%
- Complexity 11018 11186 +168
============================================
Files 1021 1032 +11
Lines 30124 30511 +387
Branches 3933 3994 +61
============================================
+ Hits 27225 27623 +398
+ Misses 1941 1913 -28
- Partials 958 975 +17 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
| @MethodSource("exportCases") | ||
| void countsDataPoints( | ||
| InternalTelemetryVersion telemetryVersion, MemoryMode memoryMode, boolean successful) { | ||
| InMemoryMetricReader reader = InMemoryMetricReader.create(); |
There was a problem hiding this comment.
Could we narrow this test to asserting the count passed to doExport, parameterized over MemoryMode? The mixed-point and empty cases cover this change. Telemetry-version and success/failure accounting belong to downstream instrumentation tests, and the callback here manually recreates that wiring.
Signed-off-by: goutamadwant <workwithgoutam@gmail.com>
|
I narrowed the test in |
Fixes #9011.
Count the data points across the exported metrics when recording exporter health metrics. Previously, a batch containing three instruments with 3, 2, and 0 points reported 3 items instead of 5. Both reusable and immutable memory modes now pass the point count to the exporter instrumentation.
The regression test checks inflight and exported counts before and after asynchronous success or failure, including empty metrics, empty batches, and subsequent exports.
Validation:
./gradlew :exporters:otlp:common:check :exporters:common:check./gradlew :exporters:otlp:all:testOkHttpVersionLATEST --tests '*MetricExporter*'