Prometheus vs OpenTelemetry for application metrics
Keep Prometheus for metric queries and alerts. Add OpenTelemetry when services need portable instrumentation or a shared route for metrics, logs and traces.
- Prometheus metrics role
- Time-series storage and PromQL
- OpenTelemetry signal role
- Instrumentation and telemetry export
- Prometheus local retention
- Time or size policy
- Long-term retention after export
- Destination backend policy
Decision guide
- Prometheus
- Choose direct Prometheus scraping when a team already exposes the metrics it needs, operates the targets and depends on PromQL alerts.
- OpenTelemetry
- Choose OpenTelemetry instrumentation when applications need to send multiple signals or change destinations. Assign each signal a storage and query backend.
- Deciding factor
- These choices can coexist. Decide which component owns each collection path and which backend must answer the on-call query.
Comparison matrix
| Decision factor | Prometheus | OpenTelemetry |
|---|---|---|
| Primary responsibility | Time-series storage and PromQL | Instrumentation and telemetry export |
| Historical metrics | Time or size policy | Destination backend policy |
Which component answers the on-call query?
Start with the question that must work during an incident. For request errors over the past hour, Prometheus can store the time series and evaluate a PromQL query. OpenTelemetry can instrument the request and carry its measurements to that backend.
Consider a checkout service that sometimes fails to reserve stock. A counter can show how often reservations fail and whether the error rate rose after a deployment. A trace can show which call consumed the timeout on a particular request. A log can supply the error message associated with that call. These are three different lookups. The metric alert can continue to run in Prometheus while the application sends spans and logs through an OpenTelemetry Collector to separate destinations. Give the on-call engineer a way to move from the alert to the service, environment and time window used in those other tools.
Make an ownership list for those lookups. Someone needs to operate the query service and retain the data. Someone else may maintain the application libraries and decide when instrument names can change. Buying storage does not update an SDK inside an old application, and deploying a Collector does not give an engineer a historical query endpoint. Assigning both responsibilities before a rollout makes the first production handover considerably easier.
Should Prometheus scrape or receive the measurement?
Keep a single collection path for a given service metric during normal operation. Direct scraping and receiving OTLP both work, but their health checks tell you different things.
In a scrape deployment, Prometheus discovers or is configured with a target and retrieves its exposed metrics on a schedule. A failed scrape leaves evidence about the attempt. With an OpenTelemetry path, the application or an intermediary exports the metric. The Prometheus project documents an opt-in OTLP receiver using HTTP and the metrics route /api/v1/otlp/v1/metrics. Configure the sender for the corresponding transport. Choose a trusted network boundary and the authentication arrangements required by your deployment before enabling incoming writes.
Follow a single instrument from its source to the query result. Check the application endpoint or SDK diagnostics, then the Collector's receiver, processor and exporter counters, and finally sample timestamps in the backend. If an exporter queue is growing, an empty dashboard does not establish that the application stopped receiving requests. For versioned change control, the project release v3.13.6 is one recorded reference. The deployed binary and its documented receiver options determine how to configure the actual instance.
Which labels should survive translation?
Preserve attributes that divide a real operational decision, such as service, environment or a bounded outcome. Keep identifiers for individual requests in a signal designed for that lookup.
Suppose a request counter has separate values for route, method and response class. Replacing a route template with a raw order path can create a distinct label value for each purchase. The application may still emit the expected total, yet the backend has many more series to ingest and query. Start with a template such as /orders/{id}, then inspect an actual series after it reaches storage. Include the emitting service's identity when separate services share the same route names. Decide whether instance identity belongs on the main panel or only in drill-down queries.
OpenTelemetry resources describe the entity producing telemetry. Prometheus documents how selected resource attributes become target information or labels during OTLP ingestion. Look at the stored metric name, units and label keys after translation. Copying attributes indiscriminately increases the number of distinct combinations, and translating a name in a dashboard does not change the label set present in the database. Create a test that runs the existing alert query against the translated series, including the case where a service reports no errors.
How much data will this path retain?
Measure the series and samples delivered to the metrics backend before estimating disk, traffic or hosted charges. Size logs and traces independently.
For a synthetic steady load, ten thousand active series sampled every fifteen seconds produce forty thousand samples a minute. That describes the input rate only. It does not tell you bytes on disk, bytes sent after network compression, the number of samples a processor dropped or the billing unit of a hosted service. Measure each quantity at the component that knows it. If the actual workload creates new instance labels with each rollout, repeat the observation across a release instead of sizing from a quiet hour between deployments.
Prometheus local storage supports time and size retention settings. Check the policy and available disk on the actual server, including headroom for working data. A remote destination may use a different policy and charge separately for ingest, retention or queries. OpenTelemetry processors can batch or filter data while moving it. Their memory and queue limits determine how they behave during an outage. They do not define how far back a user can query once that data reaches a backend. Verify retention by querying an older interval that the on-call playbook explicitly requires.
How do you compare the two routes safely?
Send one service to an isolated test destination or give its trial traffic a distinct identity. Summing a new OTLP path together with an existing scrape can silently double the metric.
Send a known number of requests, including a few deliberate application errors in a test environment. Compare the two observations over the same interval, allowing for collection boundaries and counter resets. Check the error fraction, a latency percentile and an absent-data alert. For a histogram, confirm that the exported representation and bucket boundaries support the same query and aggregation. A chart that looks similar at steady traffic can diverge when the application restarts or a slow request lands near a bucket boundary.
Stop the trial exporter briefly and watch the sender, Collector and backend. Note when telemetry becomes stale, whether a queue drains after recovery and whether older points arrive within the backend's acceptance rules. A redundant endpoint helps only if the collection design keeps series identity and write ordering coherent. Keep the original alert and its data source until the trial passes with both a healthy stream and a brief interruption.
What should the handover include?
Give the service owner the instrument name, the emitted units, the backend query and the first place to look when fresh points stop arriving.
For a small service with stable pull metrics, direct scraping may satisfy the complete requirement. A service estate with several languages, trace propagation and multiple backends may justify the shared Collector and its operating cost. Document which team can change resource attributes and which dashboards depend on them. Put the last successful end-to-end test next to the incoming data health check. When a query returns nothing, the next engineer can then tell whether the producer went quiet, a translation changed, a buffer dropped exports or the backend expired the data.
Frequently asked questions
Can an OpenTelemetry Collector keep my metrics for a month?
Use a metrics backend with the required retention and query functions. Collector queues can absorb some delivery interruptions but do not provide the historical query interface.
Can Prometheus receive traces from the same OTLP exporter?
The documented Prometheus OTLP receiver accepts metrics. Configure the trace pipeline with a destination that stores and queries spans, and check its export status separately.
Methodology and sources
The architecture follows the Prometheus OTLP guide and the OpenTelemetry component documentation. Release and repository facts from the originating project. The sample-volume calculation assumes steady active series and a constant interval.