MetricReusableDataMarshaler passes MetricData count instead of data point count to otel.sdk.exporter.metric_data_point.{inflight,exported}
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- java
- Domain
- observability
Research direction
Read exporters/otlp/common/src/main/java/io/opentelemetry/exporter/internal/otlp/metrics/MetricReusableDataMarshaler.java, especially export(Collection<MetricData>) and its doExport calls. Trace how the OTLP gRPC and HTTP exporters record the item count, then find or add coverage for metrics with multiple points and zero points. Done means both exporter metrics count the total points across all exported MetricData.
Written by the indexing model from the issue text.
Description
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>.
- Dominant language
- Java
- Stars
- 2.5k
- Forks
- 1k
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 49
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from open-telemetry/opentelemetry-java
-
Retry-After parser accepts invalid delay-seconds valuesPossibly taken @Dhruvraj-Rana claimed this today. OpenBug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
open-telemetry/opentelemetry-java#9018 ·
Maintainers usually reply within 2 days
-
PrometheusComponentProvider promotes all resource attributes when resource_constant_labels is empty ({})Possibly taken @rooks-ns claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-java#9014 ·
Maintainers usually reply within 2 days
-
Fix `otel.sdk.log.created` counting semanticsPossibly taken @anuraaga claimed this 94 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
open-telemetry/opentelemetry-java#8688 ·
Maintainers usually reply within 2 days
-
Add experimental view_matching_mode (composable metric views) supportPossibly taken @rooks-ns claimed this today. Open
Difficulty 5/5 Over a week Newbie friendliness 35/100
open-telemetry/opentelemetry-java#9013 ·
Maintainers usually reply within 2 days
-
Span/log processors and PeriodicMetricReader use static ComponentId, causing all instances to share otel.component.name "<type>/0"Possibly taken @goutamadwant claimed this today. Open
Difficulty 3/5 1-2 days Newbie friendliness 68/100
open-telemetry/opentelemetry-java#9012 ·
Maintainers usually reply within 2 days
All issues in open-telemetry/opentelemetry-java
Similar issues
-
Document and enforce pull request review guidelinesPossibly taken @dashorst claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
`Time.at(t, in: nil)` returns UTC instead of the local time (or the time zone of `t`), unlike CRubyOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
hermes-queue
Difficulty 1/5 Under an hour Newbie friendliness 72/100
chrisalunlloyd2-sudo/mindpalace#349 ·
Maintainers usually reply within 1 day
-
bug priority: medium Review effort [1-5]: 2 status: needs-triage type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
carlos-emr/carlos#5818 ·
Maintainers usually reply within 1 day
-
bug good first issue help wanted tooling
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
appmonster007/kmip-adapter#100 ·