Repository navigation
Conversation
Pull request dashboard statusWaiting on reviewers · refreshed 2026-11-09 20:58 UTC Review the latest changes. Status above doesn't look right?
|
dashpole
force-pushed
the
fix-prom-export-metrics-batch
branch
from
November 8, 2026 00:43
7870d65 to
b04dd59
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9465 +/- ##
=======================================
- Coverage 89.9% 89.8% -0.1%
=======================================
Files 357 357
Lines 23987 24012 +25
=======================================
+ Hits 21565 21573 +8
- Misses 2422 2439 +17
🚀 New features to boost your workflow:
|
dashpole
force-pushed
the
fix-prom-export-metrics-batch
branch
from
November 8, 2026 00:49
b04dd59 to
95818fc
Compare
dashpole
marked this pull request as ready for review
November 8, 2026 01:15
dashpole
requested review from
MrAlias,
XSAM,
dmathieu,
pellared and
ps-mir
as code owners
November 8, 2026 01:15
dashpole
force-pushed
the
fix-prom-export-metrics-batch
branch
from
November 9, 2026 20:49
95818fc to
08ff0a3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #9452
Summary
In
exporters/prometheus,collector.Collectpreviously calledc.inst.ExportMetricsinside each per-metric-family helper (addHistogramMetric,addExponentialHistogramMetric,addSumMetric, andaddGaugeMetric) rather than once for the collectedResourceMetricsbatch:add*Metricwas reached—whencreateResourceAttributesfailed,scopeMetrics.Scope.Name == bridgeScopeNamewas skipped,appendScopeAttrsfailed,c.metricType(m) == nil,c.getName(m)failed, orc.validateMetricsdropped a conflicting metric family—were never counted inotel.sdk.exporter.metric_data_point.inflightor recorded as failed inotel.sdk.exporter.metric_data_point.exported.otel.sdk.exporter.metric_data_point.inflightonly reflected the data points of a single metric family at a time rather than the collected batch in flight, and invoked the synchronous counter instruments once per metric family instead of once per scrape.This change moves
c.inst.ExportMetrics(ctx, countDataPoints(metrics))andop.End(success, exportErr)tocollector.Collect(matchingexporters/stdout/stdoutmetric), returns(int64, error)from theadd*Metrichelpers, and joins all metric/scope/resource validation errors intoexportErrso dropped data points are properly accounted for.