Skip to content

MetricReusableDataMarshaler passes MetricData count instead of data point count to otel.sdk.exporter.metric_data_point.{inflight,exported} #9011

Open

Description

@dashpole

Description

In MetricReusableDataMarshaler.export(Collection<MetricData> metrics), metrics.size() (the number of MetricData instruments) is passed as the item count to doExport:

In OtlpGrpcMetricExporter and OtlpHttpMetricExporter, doExport delegates to GrpcExporter.export(exportRequest, numItems) and HttpExporter.export(exportRequest, numItems), which pass numItems to ExporterInstrumentation.startRecordingExport(numItems) (SemConvExporterMetrics.startRecordingExport(numItems)), recording otel.sdk.exporter.metric_data_point.inflight and otel.sdk.exporter.metric_data_point.exported. When a MetricData contains multiple PointData entries (or 0 points), the recorded count reflects the number of metric instruments rather than the number of metric data points ({data_point}).

Expected behavior

otel.sdk.exporter.metric_data_point.inflight and otel.sdk.exporter.metric_data_point.exported should count the total number of metric data points (metricData.getData().getPoints().size()) across the exported Collection<MetricData>.

Activity

  1. goutamadwant commented on Nov 7, 2026

    @goutamadwant

    @dashpole fixed the bug in #9016. Can you pls go through it share any comments or suggestions. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions