-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Labels
enhancementNew feature or requestNew feature or requestexporter/prometheusgood first issueGood for newcomersGood for newcomersnever staleIssues marked with this label will be never staled and automatically removedIssues marked with this label will be never staled and automatically removed
Description
Component(s)
exporter/prometheus
What happened?
Description
Currently, prometheusreceiver supports native histograms, but prometheusexporter cannot expose them (because Prometheus cannot expose native histograms in text format yet).
Steps to Reproduce
- Instrument your code with native histograms
- Scrape the metrics with
prometheusreceiverby following the instructions here: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/f5d54da37ae664e1a0b6934a61d38f1afab5501f/receiver/prometheusreceiver/README.md#prometheus-native-histograms
Expected Result
prometheusexporter should expose native histograms
Actual Result
Logs via debugexporter:
{"level":"error","ts":1718965637.50062,"caller":"[email protected]/accumulator.go:94","msg":"failed to translate metric","kind":"exporter","data_type":"metrics","name":"prometheus","data_type":"\u0004","metric_name":"gloo_mesh_translation_time_sec","stacktrace":"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter.(*lastValueAccumulator).addMetric
\tgithub.com/open-telemetry/opentelemetry-collector-contrib/exporter/[email protected]/accumulator.go:94
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter.(*lastValueAccumulator).Accumulate
\tgithub.com/open-telemetry/opentelemetry-collector-contrib/exporter/[email protected]/accumulator.go:71
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter.(*collector).processMetrics
\tgithub.com/open-telemetry/opentelemetry-collector-contrib/exporter/[email protected]/collector.go:88
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter.(*prometheusExporter).ConsumeMetrics
\tgithub.com/open-telemetry/opentelemetry-collector-contrib/exporter/[email protected]/prometheus.go:85
go.opentelemetry.io/collector/exporter/exporterhelper.(*metricsRequest).Export
\tgo.opentelemetry.io/collector/[email protected]/exporterhelper/metrics.go:59
go.opentelemetry.io/collector/exporter/exporterhelper.(*timeoutSender).send
\tgo.opentelemetry.io/collector/[email protected]/exporterhelper/timeout_sender.go:49
go.opentelemetry.io/collector/exporter/exporterhelper.(*baseRequestSender).send
\tgo.opentelemetry.io/collector/[email protected]/exporterhelper/common.go:37
go.opentelemetry.io/collector/exporter/exporterhelper.(*metricsSenderWithObservability).send
\tgo.opentelemetry.io/collector/[email protected]/exporterhelper/metrics.go:158
--
Collector version
v0.103.0
Environment information
N/A
OpenTelemetry Collector configuration
receivers:
prometheus:
config:
global:
evaluation_interval: 1m
scrape_interval: 15s
scrape_timeout: 15s
scrape_protocols: [ PrometheusProto, OpenMetricsText1.0.0, OpenMetricsText0.0.1, PrometheusText0.0.4 ]
scrape_configs:
<your targets exposing native histograms>
...
pipelines:
metrics/test:
receivers:
- prometheus
exporters:
- debug
- prometheusLog output
{"level":"error","ts":1718965637.50062,"caller":"[email protected]/accumulator.go:94","msg":"failed to translate metric","kind":"exporter","data_type":"metrics","name":"prometheus","data_type":"\u0004","metric_name":"gloo_mesh_translation_time_sec","stacktrace":"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter.(*lastValueAccumulator).addMetric
\tgithub.com/open-telemetry/opentelemetry-collector-contrib/exporter/[email protected]/accumulator.go:94
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter.(*lastValueAccumulator).Accumulate
\tgithub.com/open-telemetry/opentelemetry-collector-contrib/exporter/[email protected]/accumulator.go:71
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter.(*collector).processMetrics
\tgithub.com/open-telemetry/opentelemetry-collector-contrib/exporter/[email protected]/collector.go:88
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter.(*prometheusExporter).ConsumeMetrics
\tgithub.com/open-telemetry/opentelemetry-collector-contrib/exporter/[email protected]/prometheus.go:85
go.opentelemetry.io/collector/exporter/exporterhelper.(*metricsRequest).Export
\tgo.opentelemetry.io/collector/[email protected]/exporterhelper/metrics.go:59
go.opentelemetry.io/collector/exporter/exporterhelper.(*timeoutSender).send
\tgo.opentelemetry.io/collector/[email protected]/exporterhelper/timeout_sender.go:49
go.opentelemetry.io/collector/exporter/exporterhelper.(*baseRequestSender).send
\tgo.opentelemetry.io/collector/[email protected]/exporterhelper/common.go:37
go.opentelemetry.io/collector/exporter/exporterhelper.(*metricsSenderWithObservability).send
\tgo.opentelemetry.io/collector/[email protected]/exporterhelper/metrics.go:158
--Additional context
No response
krantideep95, kristinapathak and lightme16
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestexporter/prometheusgood first issueGood for newcomersGood for newcomersnever staleIssues marked with this label will be never staled and automatically removedIssues marked with this label will be never staled and automatically removed