Glossary · P

Prometheus

Open-source monitoring system that scrapes metrics over HTTP, stores them as labeled time series and queries them with PromQL.

By Obseria TeamUpdated

Definition

Prometheus is an open-source monitoring and alerting system that collects metrics by periodically scraping HTTP endpoints, stores them as time series identified by a metric name and labels, and evaluates queries and alert rules in its query language PromQL. It is a graduated project of the Cloud Native Computing Foundation and a de facto standard for Kubernetes metrics.

What is Prometheus?

Prometheus is an open-source monitoring system and time series database. It was started at SoundCloud in 2012, inspired by Google's internal Borgmon, and published as an independent open-source project. In 2016 it joined the Cloud Native Computing Foundation (CNCF) as its second hosted project after Kubernetes and graduated in 2018. Prometheus is written in Go, distributed as a single binary and licensed under Apache 2.0. Version 3.0, released in November 2024, brought a new web UI, UTF-8 metric and label names and a native OTLP receiver.

Prometheus focuses on numeric metrics such as request counts, latencies, memory usage or queue depth. It does not store logs or traces, and it is designed for reliability of the monitoring itself: each server works on its own local storage, so it keeps running during the outages it is supposed to detect.

Data model: metrics and labels

Every time series is identified by a metric name and a set of key-value labels:

http_requests_total{service="checkout", method="POST", status="500"}  1027

Labels make the data multi-dimensional, so you can filter and aggregate by any combination. Each unique label combination creates its own series, which is why label values with many distinct values (user IDs, request IDs) cause high cardinality and memory problems. Prometheus client libraries offer four metric types: counter, gauge, histogram and summary. Native histograms with exponential buckets are an additional, more efficient histogram representation.

Architecture

  • Prometheus server: discovers targets, scrapes them, stores samples in its local TSDB and evaluates recording and alerting rules.
  • Targets and exporters: applications expose metrics on an HTTP endpoint, usually /metrics, either through a client library or through an exporter that translates metrics of third-party systems.
  • Service discovery: built-in integrations for Kubernetes, cloud providers, Consul, DNS and file-based lists keep the target list current.
  • Alertmanager: a separate component that deduplicates, groups, silences and routes alerts to e-mail, chat or paging tools.
  • Pushgateway: an optional intermediary for short-lived batch jobs that cannot be scraped.
  • Remote write and read: interfaces for sending data to long-term storage systems.

The pull model

Unlike push-based systems, Prometheus pulls metrics: it scrapes each target at a fixed interval. This has practical advantages. The server knows which targets should exist, so a target that does not answer is visible immediately through the synthetic up metric. Targets need no knowledge of where the monitoring lives, and you can open the /metrics page in a browser to debug. The downside is that targets must be reachable from the server, which can be tricky across networks and for very short-lived processes.

PromQL and alerting

PromQL is the functional query language of Prometheus. It selects series by labels, computes rates from counters, aggregates across dimensions and calculates percentiles from histograms:

sum by (service) (rate(http_requests_total{status=~"5.."}[5m]))
  / sum by (service) (rate(http_requests_total[5m]))

The same expressions drive alerting rules. When a rule's condition holds for a configured duration, Prometheus sends the alert to Alertmanager. Recording rules precompute expensive queries for dashboards.

Limits at scale

A single Prometheus server is intentionally simple. As environments grow, teams typically hit these limits:

  • No built-in clustering: high availability means running two identical servers; global views need federation or an external system.
  • Retention: local storage is meant for days to weeks, not years.
  • Cardinality: memory grows with the number of active series.
  • Metrics only: correlation with logs and traces requires additional tools.

Projects such as Thanos, Cortex and Grafana Mimir, as well as commercial backends, address this via remote write.

Prometheus and OpenTelemetry

Prometheus and OpenTelemetry complement each other. The OpenTelemetry Collector can scrape Prometheus endpoints, and Prometheus 3 can ingest OTLP metrics directly. Many teams keep existing exporters and dashboards while adding OpenTelemetry for traces and logs.

When the two meet, a few details need attention. OpenTelemetry metric names use dots and units as metadata, while classic Prometheus names use underscores and unit suffixes; translation rules map one to the other. OpenTelemetry resource attributes such as service.name become the job label or a separate info metric. Delta temporality, which some OpenTelemetry SDKs use, has to be converted to the cumulative counters Prometheus expects. Settling these conventions early keeps queries and dashboards consistent across both worlds.

How Obseria helps

Obseria accepts Prometheus remote write and scrapes existing endpoints through the Obseria Agent or an OpenTelemetry Collector, so exporters and PromQL dashboards keep working. Metrics land in Obseria Lake with long retention and are correlated with traces and logs. See the Prometheus integration and metrics monitoring.

Frequently asked questions

Yes. Prometheus is open source under the Apache 2.0 license and maintained as a graduated CNCF project. Costs arise from the infrastructure and operations needed to run it at scale.

No. Prometheus is designed for numeric metrics. Logs and traces need separate systems, ideally connected to metrics through shared labels, trace IDs or exemplars.

Prometheus collects, stores and queries metrics and evaluates alerts. Grafana is a visualization tool that can use Prometheus as a data source for dashboards.

Both work together. OpenTelemetry standardizes instrumentation and transport for metrics, traces and logs; Prometheus is a metrics backend and scraper. Prometheus 3 accepts OTLP, and the OpenTelemetry Collector can scrape Prometheus targets.

Put these concepts into practice

Try Obseria free for 14 days, with OpenTelemetry and no proprietary agents.