The OpenTelemetry Prometheus exporter does two things people don’t expect. It appends the unit to the metric name but never converts the values, so a histogram recorded in milliseconds stays in milliseconds. And the Prometheus remote write exporter drops delta sums and delta histograms without returning an error, so the series never show up.
This post covers both, plus the Collector config that fixes them. Along the way it covers how Prometheus and OpenTelemetry coexist, how the Prometheus receiver translates metrics into OTLP, and when you need the exporter instead of plain OTLP. Prometheus is still the metrics standard for many teams, and OpenTelemetry is where new instrumentation is going, so most stacks run both.
Why Both Systems Can Coexist
Some of your services use the Prometheus client library and expose metrics over HTTP. Newer ones use OpenTelemetry SDKs. The OpenTelemetry Collector sits between them. Its Prometheus receiver scrapes existing endpoints the way Prometheus does and converts the result to OTLP. Its Prometheus exporter and remote write exporter go the other way, from OTLP to Prometheus formats.
That second direction is where the gaps are. The two upstream issues that prompted this refresh show them:
- Units are not converted to seconds. Closed as not planned in November 2026, with the maintainers calling it working as intended under the OpenTelemetry compatibility spec.
- Delta exponential histograms are dropped by remote write. Closed as completed in November 2026, because the fix lives in the
delta_to_cumulativeprocessor rather than in the exporter.
Neither closure changes what the exporters do by default. Both are config problems you solve in the pipeline, and the rest of this post shows how.
What Happens When Metrics Cross Over
The OpenTelemetry Prometheus compatibility spec defines the mapping in both directions, so the conversion is predictable.
Prometheus to OTLP (the receiver direction):
- Labels become attributes, and HELP text becomes the metric description.
- A counter becomes a monotonic Sum, a gauge becomes a Gauge, and a histogram becomes a Histogram.
- A summary becomes an OTLP Summary, and an untyped (unknown) metric becomes a Gauge.
- Unit metadata such as
millisecondsbecomes the UCUM abbreviationms.
OTLP to Prometheus (the exporter direction):
- The unit is translated to a Prometheus unit word and added to the name as a suffix, so
msbecomes_milliseconds. A monotonic Sum also gets_total. - Resource attributes go to a separate
target_infometric.service.nameandservice.instance.idpopulate thejobandinstancelabels. - Cumulative sums become counters and cumulative histograms become Prometheus histograms. Delta data is where the spec leaves room: delta histograms may be aggregated to cumulative or must be dropped, and delta monotonic sums may be converted to cumulative.
To understand how grouping and reshaping metrics work in Prometheus itself, see our breakdown of Prometheus group by label techniques!
The Prometheus Receiver in Action
The receiver scrapes targets on a schedule, translates the metrics and routes them through the Collector pipeline. If you’ve written Prometheus scrape configs before, the syntax is familiar:
receivers: prometheus: config: scrape_configs: - job_name: "my-service" scrape_interval: 30s static_configs: - targets: ["localhost:8080"]
processors: batch:
exporters: otlp: endpoint: collector.example.com:4317
service: pipelines: metrics: receivers: [prometheus] processors: [batch] exporters: [otlp]This scrapes localhost:8080 every 30 seconds, batches the metrics and sends them over OTLP. The full Prometheus scrape_configs syntax works here: service discovery, authentication and TLS. The spec requires the receiver to attach service.name and service.instance.id to every scraped metric, which is how two jobs exposing the same metric name stay distinguishable downstream. Node Exporter is a worked example: run it beside the Collector and scrape port 9100 for hardware temperature and Linux pressure metrics.
Filter and Rename Metrics
Prometheus users rely on relabeling to control what gets collected. The receiver keeps that capability, in two stages:
- Before scraping,
relabel_configsfilters or labels targets by metadata, so you include only certain services or environments. - After scraping,
metric_relabel_configsshapes the metric data: keep series, rename them or drop labels.
receivers: prometheus: config: scrape_configs: - job_name: "app-metrics" scrape_interval: 30s static_configs: - targets: ["app:9090"] metric_relabel_configs: - source_labels: [__name__] regex: "app_requests.*" action: keep - source_labels: [__name__] regex: ".*_bucket" action: dropThis keeps only metrics that begin with app_requests and removes the _bucket series. Everything left is translated to OTLP and forwarded.
If you want a quick refresher on how counters and gauges behave during collection, our Prometheus gauges vs counters guide covers it in detail!
Pull-Based vs. Push-Based Metrics
You choose how metrics leave the Collector as well as how they arrive.
Pull-based collection uses the Prometheus receiver to scrape a /metrics endpoint, or the Prometheus exporter to expose one for a Prometheus server to scrape. Nothing changes in application code.
Push-based collection uses the Prometheus remote write exporter. It suits services behind a load balancer with no scrape access, or cases where you want to control when data is sent:
exporters: prometheusremotewrite: endpoint: https://collector.example.com/api/v1/writePush has a catch. Remote write is stateless, so it cannot turn delta data into cumulative data. The table summarises what each exporter does with the inputs that cause trouble:
| OTLP input | Prometheus exporter | Remote write exporter |
|---|---|---|
| Unit in milliseconds | Adds _milliseconds suffix, value unchanged | Adds _milliseconds suffix, value unchanged |
| Delta monotonic sum | Accumulated to cumulative (non-monotonic delta sums are refused) | Dropped |
| Delta histogram | Accumulated to cumulative | Dropped |
| Delta exponential histogram | Accumulated, exposed as a native histogram | Dropped |
The remote write row for units rests on the exporter’s README and spec-driven translation, and we found no rescaling step in its code. The delta rows come from the exporters’ READMEs and the current main branch of the Collector contrib repository, so check them against the version you run.
Why OTLP Units Don’t Become Seconds
Prometheus convention says durations are in seconds. OTLP carries whatever unit the instrumentation chose, and the exporter does not reconcile the two. Send a histogram with unit ms and a measurement of 123, and Prometheus receives a series named ..._milliseconds with the value 123, not a series in seconds with the value 0.123.
That is deliberate. The maintainers’ reasoning on the upstream issue is that explicit histogram bucket bounds could be rescaled, but exponential histogram bounds cannot be rescaled arbitrarily, and the exporter should not treat the two differently. The expectation is that the producer sends seconds, which is what the OpenTelemetry semantic conventions use for HTTP durations.
You have two fixes:
- Fix it at the source. Record durations in seconds in the SDK. This is the only fix that also works for exponential histograms.
- Rescale in the Collector. The transform processor’s
scale_metricmultiplies values and can set a new unit. It supports gauges, sums, histograms and summaries, and its README does not list exponential histograms.
processors: transform/seconds: error_mode: ignore metric_statements: - scale_metric(0.001, "s") where metric.unit == "ms"After applying it, look at the exported bucket bounds as well as the values. Then check that dashboards written against the _milliseconds name were updated, because the metric name changes with the unit.
Delta Temporality and Exponential Histograms
Temporality is whether each data point holds everything since the process started (cumulative) or only the change since the last export (delta). Prometheus counters and histograms are cumulative, so delta data has to be converted somewhere. For the underlying model, see our guide to OpenTelemetry metrics aggregation.
The Prometheus remote write exporter’s README warns that non-cumulative monotonic sums, histograms and summaries are dropped. In the code, a metric with an invalid temporality and type combination is skipped during translation. The failure goes to a debug log and a failed-translations counter, and the exporter carries on with the rest of the batch. Nothing surfaces as a pipeline error, so the first sign is usually an empty panel.
The fix is to convert before the exporter, using the delta_to_cumulative processor:
receivers: otlp: protocols: grpc: endpoint: 0.0.0.0:4317
processors: delta_to_cumulative: max_stale: 5m batch:
exporters: prometheusremotewrite: endpoint: https://remote-write.example.com/api/v1/write
service: pipelines: metrics: receivers: [otlp] processors: [delta_to_cumulative, batch] exporters: [prometheusremotewrite]The processor supports delta exponential histograms, which was the gap in the upstream issue (added in May 2024). Three limits to plan for:
- It is alpha. Treat its config and behavior as subject to change between releases.
- It is stateful. It accumulates samples in memory, so every sample of a series must reach the same Collector instance.
- It has bounds.
max_stale(default 5m) removes series that stop reporting, andmax_streams(default max int) caps tracked streams, dropping new ones past the limit.
The Prometheus exporter does not need the processor. It accumulates monotonic delta sums and delta histograms itself, and refuses non-monotonic delta sums, which have no counter equivalent. It also converts exponential histograms to Prometheus native histograms, which Prometheus reads only if it scrapes with the protobuf format and has native histograms enabled. Its README notes that exemplars are not supported for native histograms.
If you control the SDK, the simplest option is to skip the conversion entirely and set cumulative temporality with OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=cumulative.
Working With Metrics That Have Multiple Dimensions
Some metrics break down across several labels: user_id, tenant_id, region or instance. They are high-cardinality metrics, and they are valuable because they show what specific users, tenants or components experience. Sometimes you still want to reduce, reshape or drop a dimension before export.
Drop a dimension you don’t need:
metric_relabel_configs: - source_labels: [__name__, user_id] regex: "request_duration_ms;.*" action: dropKeep only the metrics you care about:
metric_relabel_configs: - source_labels: [__name__] regex: "cart_.*" action: keepRename metrics so similar series from different services line up:
metric_relabel_configs: - source_labels: [__name__] target_label: __name__ replacement: "checkout_latency_ms"Relabeling applies at ingestion, before metrics move further down the pipeline. Per-tenant detail gives fast answers, aggregation keeps the signal tight, and dropping a dimension makes sense when no dashboard or alert uses it. In the Collector you can also aggregate with the transform processor’s aggregate_on_attributes function.
For concrete alerting patterns that work well in production, our guide covers proven Prometheus examples!
How New Services Emit Metrics in a Prometheus + OpenTelemetry Setup
For a new service that must emit metrics next to an existing Prometheus setup, OpenTelemetry gives you options. In Go, the Prometheus bridge keeps existing Prometheus instrumentation while exporting through OpenTelemetry:
import ( "go.opentelemetry.io/contrib/bridges/prometheus" "go.opentelemetry.io/otel/sdk/metric")
bridge := prometheus.NewMetricProducer()reader := metric.NewManualReader(metric.WithProducer(bridge))provider := metric.NewMeterProvider(metric.WithReader(reader))You don’t have to rework instrumentation. The bridge sends metrics from both Prometheus and OpenTelemetry libraries through the same path.
When You Need the OpenTelemetry Prometheus Exporter
A Prometheus exporter exposes metrics in a format a Prometheus server can scrape. The Collector’s Prometheus exporter takes OTLP metrics and serves them on a /metrics path. It is a beta component:
exporters: prometheus: endpoint: "0.0.0.0:8889" translation_strategy: UnderscoreEscapingWithSuffixes enable_open_metrics: trueMetrics are then available at http://<collector-host>:8889/metrics. The port matters. The Collector exposes its own internal telemetry on port 8888 by default, so pointing the exporter at 8888 puts two things on one port.
The options worth knowing:
translation_strategycontrols name translation.UnderscoreEscapingWithSuffixes(the default) escapes special characters and adds type and unit suffixes.NoTranslationpasses names and labels through untouched.enable_open_metricsexports in the OpenMetrics format, the only one that carries exemplars.metric_expiration(default 5m) controls how long a series stays exposed without updates.- Resource attributes land on
target_infounless you copy them to labels withresource_constant_labelsor the transform processor.
If you control both your instrumentation and your backend, you can skip this step and send OTLP directly. That avoids the suffixing, the target_info join and the pull model altogether.
Practical Scenarios and How They Play Out
When you wire OTLP into Prometheus-format backends, a few patterns show up. Each one has a quick check.
Values are 1000x too large in Prometheus
A latency panel shows 123 where you expected 0.123. The SDK is recording milliseconds, and the exporter appended _milliseconds without converting. Check the metric name for the suffix, then either record seconds in the SDK or apply scale_metric and update dashboards.
Metrics vanished after an SDK switched to delta
Counters and histograms stop arriving at a remote write endpoint after an SDK upgrade or config change. Check the SDK’s temporality preference first. Then turn on debug logs in the Collector (service.telemetry.logs.level: debug) and watch the Collector’s internal telemetry, which is on port 8888 by default, for otelcol_exporter_prometheusremotewrite_failed_translations. Add delta_to_cumulative or switch the SDK to cumulative.
Scrape targets aren’t reachable
If the Collector can’t scrape a target like localhost:8080, the logs show a warning such as:
level=warn msg="Error scraping target" err="connection refused"Check that the service is running, that localhost inside a container is not the host’s localhost, and that no firewall or security group blocks the port.
Metrics look different after relabeling
A regex that matches more broadly or narrowly than expected reshapes series. Print the raw /metrics output, remove relabel rules one at a time to find the one responsible, and test the regex against sample data.
Format conversions during translation
Most types map cleanly, but a few differ from what you might assume. An untyped Prometheus metric becomes an OTLP Gauge, and a summary becomes an OTLP Summary rather than a histogram. To verify, inspect the payload with the debug exporter and compare it with your backend’s representation.
Metrics with many label combinations
A metric can expand into thousands of series when labels vary by user, tenant or region. Use metric_relabel_configs to drop or merge labels, for example removing user_id while keeping tenant_id. In the Collector, the transform and filter processors can also reshape or remove series before export.
Understanding how histogram buckets work and how to tune them is key for latency metrics: our histogram buckets in Prometheus guide explains it in detail!
The Practical Advantage
You don’t have to switch everything at once. Existing Prometheus instrumentation keeps running, new services emit OTLP, and the Collector bridges the gap. The one rule that saves the most debugging is to settle units and temporality before data leaves the Collector.
- Send OTLP straight from the Collector, with no Prometheus exposition step to translate units
- Record durations in seconds, or rescale with
scale_metricbefore export - Use cumulative temporality in the SDK, or
delta_to_cumulativein the Collector, before any Prometheus-format exporter
Last9 is a telemetry data platform that is Prometheus-compatible and OpenTelemetry-native, so you can route data from both systems into one backend and query it with PromQL. Last9 keeps high-cardinality labels with no sampling. For one integration, the Claude Code docs state that Last9 expects cumulative counters, so check the temporality your own SDKs export before you assume otherwise.
Getting started takes minutes. Start with Last9, and if you get stuck, book time with us for a walkthrough.
FAQs
Does the OpenTelemetry Prometheus exporter convert milliseconds to seconds?
No. The exporter translates the OTLP unit into a Prometheus unit word and appends it to the metric name, so ms becomes _milliseconds, but it does not rescale data point values or histogram bucket bounds. A 123 ms measurement is exposed as 123. To get seconds, send seconds from the SDK or rescale in the Collector with the transform processor’s scale_metric(0.001, "s"), which covers gauges, sums, summaries and explicit-bucket histograms but not exponential histograms.
Why does the Prometheus remote write exporter drop my histograms?
Its README says non-cumulative monotonic sums, histograms and summaries are dropped. If your SDK exports with delta temporality, those metrics never reach the remote write endpoint, and the exporter logs the failure only at debug level. Set cumulative temporality in the SDK, or put the delta_to_cumulative processor in front of the exporter.
How do I send delta exponential histograms to a Prometheus backend?
Add the delta_to_cumulative processor to the metrics pipeline before the exporter. It supports delta exponential histograms (added in May 2024) and keeps state in memory. With the Prometheus exporter, exponential histograms are then exposed as native histograms, and Prometheus must scrape with the protobuf format to read them.
Can Prometheus and OpenTelemetry run together?
Yes. Prometheus keeps exposing /metrics, and the OpenTelemetry Collector scrapes those endpoints with its Prometheus receiver and converts them to OTLP. New services can emit OTLP directly, and the Collector can expose OTLP data back in Prometheus format when something needs to scrape it.
How are Prometheus metric types mapped to OpenTelemetry?
Per the OpenTelemetry compatibility spec, a Prometheus counter becomes a monotonic OTLP Sum, a gauge becomes a Gauge, a histogram becomes a Histogram, a summary becomes an OTLP Summary, and an untyped (unknown) metric becomes a Gauge. Labels become attributes and HELP text becomes the metric description.
Should I use pull-based or push-based collection?
Pull-based scraping with the Prometheus receiver is simpler when services already expose /metrics. Push-based remote write suits services that cannot be scraped. Remember that remote write drops delta data, so check temporality before choosing it.
