OpenTelemetry vs Prometheus: Where each fits

Compare what OpenTelemetry and Prometheus do, choose a metrics path, and check OTLP ingestion, labels, aggregation, and alerting before changing it.

Best practices
Illustration of metric collection, storage, and visualization

Suppose the checkout team already has a Prometheus alert for slow requests. OpenTelemetry can add the spans that show where the time went. The existing alert can keep running. What takes work is changing the path the metric follows. A query grouped by scrape target may return a different result once the metric arrives as OTLP.

OpenTelemetry provides instrumentation and a telemetry pipeline. Prometheus stores and queries metrics and evaluates alerting rules. They fit together when you decide which component owns each job.

OpenTelemetry and Prometheus at a glance

  • OpenTelemetry covers signals including traces, metrics, and logs. Prometheus stores and queries metric time series.
  • An OTLP sender pushes data. A Collector can also scrape Prometheus endpoints, and a Prometheus server can opt in to OTLP/HTTP metrics ingestion.
  • Prometheus evaluates PromQL and alerting rules. Alertmanager groups, deduplicates, and routes notifications.
  • You can keep metrics in Prometheus and send traces and logs to their own destinations.

Which component does which job?

Decision OpenTelemetry Prometheus
Instrument an application APIs, SDKs, and automatic instrumentation can produce telemetry Client libraries can expose application metrics
Move metrics Push via OTLP or configure a Collector to scrape or export Scrape endpoints or enable an OTLP/HTTP or Remote Write receiver
Identify the data Resource, instrumentation scope, and signal-specific records Metric name and label set identify each time series
Keep and query metrics Send them to a backend Server includes a time-series database and PromQL
Evaluate and route alerts Use the receiving backend Server evaluates rules. Alertmanager handles grouping, deduplication, and notification routing
Work across signals Pipelines can carry traces, metrics, and logs Metrics are the storage and query scope
Project foundation CNCF CNCF

When would you use each?

If you need to follow checkout through its dependencies, instrument the request path with OpenTelemetry and export spans to a tracing backend. Prometheus can still tell you how often the operation is slow. Each signal answers a different part of the question.

For infrastructure monitoring, keep an existing node_exporter and Prometheus setup when dashboards and alerts already depend on it. The Collector’s hostmetrics receiver can collect host metrics too. Compare the names and labels before expecting those existing rules to match.

Separate backends can work well. If you need metrics, traces, and logs together in Guance, connect each signal through a supported input and check the fields you rely on to correlate them.

Three ways to combine them

  1. OpenTelemetry instrumentation, Prometheus storage. Use the SDK’s Prometheus exporter where available, or expose a scrape endpoint through the Collector’s Prometheus exporter. Another route is to send OTLP/HTTP metrics to a Prometheus server with ingestion enabled. Traces and logs can still go elsewhere.
  2. OpenTelemetry instrumentation, Collector, and Guance. Let the Collector receive and route each signal to a configured destination. Its Prometheus receiver scrapes targets. The Prometheus exporter makes an endpoint available to scrape. The Prometheus Remote Write exporter pushes to a compatible Remote Write receiver. OTLP and Remote Write use different protocols.
  3. Keep the Prometheus estate and connect Guance. The DataKit prom input can scrape the existing exporters. If Prometheus already owns scraping, it can forward samples to the DataKit Prometheus Remote Write input. Keep server mode if you still need its queries and rules. Agent mode makes sense when another system handles storage, queries, and alerts.

If you send metrics to Prometheus over OTLP

The Prometheus OTLP receiver is off by default. On a supporting server, --web.enable-otlp-receiver enables OTLP/HTTP metrics at the default route /api/v1/otlp/v1/metrics. The HTTP API documentation recommends this receiver for specific low-volume use cases. Keep existing scraping for larger-scale collection. This example assumes an SDK that supports these environment variables and a trusted test network. Substitute the real host and route.

export OTEL_METRICS_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_METRICS_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=http://prometheus:9090/api/v1/otlp/v1/metrics

The OTLP exporter specification uses a signal-specific URL as provided. With the shared OTEL_EXPORTER_OTLP_ENDPOINT, use the base path /api/v1/otlp and let the exporter append /v1/metrics. Configure access control and TLS for the actual production endpoint.

Check what changes in the metric

Start with a metric whose name, unit, labels, and value you can verify. In Prometheus’s OTLP receiver, otlp.translation_strategy affects names and labels. The receiver does not copy every resource attribute onto every series. Where the identifying attributes exist, it can derive job and instance from service.name, service.namespace, and service.instance.id. A dashboard that selects the old scrape address in instance can go blank after the switch, even though the samples are arriving.

Check aggregation as well. PromQL counter functions such as rate() and increase() expect cumulative counters. If the source sends delta values, verify support in the deployed version and configuration. Prometheus v3.2 added conversion via --enable-feature=otlp-deltatocumulative. Releases with experimental native delta ingestion offer it as a separate, mutually exclusive mode. A classic histogram usually has _bucket series with an le label. A native histogram uses a different query shape, so an old bucket-based expression may stop finding data. Prometheus OTLP feature flags · Histogram queries

For Guance, configure the appropriate DataKit OpenTelemetry input or the Prometheus scrape input. If you compare two paths in parallel, keep the comparison series distinct so they do not inflate the same count. Check query results, rule behavior, and notification routing after confirming that ingestion works.

Frequently asked questions

Will OpenTelemetry replace Prometheus? They cover different parts of the system. Adding OpenTelemetry instrumentation and a Collector can leave Prometheus in charge of metric storage, PromQL, and rule evaluation.

What changes when moving from a Prometheus stack to Guance? DataKit can scrape exporters or receive forwarded metrics. Inventory the series, dashboards, recording rules, alerts, and notification routing you rely on. The amount of work depends on the behavior you need to preserve.

Where do the Collector and Prometheus Agent mode overlap? Both can scrape and forward metrics. Prometheus Agent mode retains scraping and service discovery and forwards via Remote Write, with no local querying or rule evaluation. The Collector can receive and process multiple signals. Choose based on the destination protocol, processing, and pipelines you already run.

Can I use PromQL in Guance? Guance supports PromQL in metrics analysis. Check the data source, metric names, labels, and time windows. If you move a query to DQL, verify the rate and aggregation in that language. Test notification routing separately from the expression.

Further reading

References: OpenTelemetry and Prometheus compatibility · Prometheus alerting and Alertmanager · DataKit documentation · Guance monitoring

Get a tailored plan

Contact us

Join the community

Scan with WeChat
to join the community

Try Guance

Start online and pay only for what you use.

Get started

Choose a Guance plan

Code hosting