Prometheus — Overview#

Identity#

Purpose#

Prometheus is a systems and service monitoring system that collects metrics from configured targets at given intervals, evaluates rule expressions, and triggers alerts when specified conditions are observed. It is designed for operators and SREs who need reliable, multi-dimensional metric collection and querying without depending on distributed storage. Targets are discovered dynamically via service discovery or static configuration, and metrics are scraped over HTTP using a pull model.

Significance#

Prometheus is one of the most influential projects in the cloud-native ecosystem and the second project to graduate from the CNCF (after Kubernetes). It effectively defined the modern metrics-and-alerting stack for containerized workloads and created the de-facto standard exposition format for Go instrumentation via prometheus/client_golang. PromQL is widely referenced as a model for time-series query languages, and Prometheus’s data model (metric name + label set = time series) has been adopted or emulated by virtually every modern observability system, including Datadog, VictoriaMetrics, Thanos, Cortex, and Grafana Mimir.

Key metrics#

  • Go files: 697 (excluding vendor)
  • Top-level directories: cmd, compliance, config, discovery, docs, documentation, internal, model, notifier, plugins, prompb, promql, rules, schema, scrape, scripts, storage, template, tracing, tsdb, util, web
  • Direct dependencies: ~90 (spanning AWS, Azure, GCP, Kubernetes, OpenTelemetry, Consul, Nomad, Docker, and more cloud provider SDKs)
  • First commit / age: Project began ~2012; among the oldest and most mature Go projects in the cloud-native space

Notable characteristics#

  • Built-in TSDB: Prometheus ships its own embedded time-series database (tsdb/) — a custom WAL-based columnar store with block compaction — rather than relying on any external storage engine. This makes single-node deployments fully self-contained.
  • Custom query language: PromQL is implemented entirely in-process (promql/), including a hand-written parser, AST, and evaluation engine. This is a significant piece of bespoke engineering rarely seen in Go projects.
  • Build-tag–controlled service discovery plugins: Optional service discovery backends (AWS EC2, Azure, GCP, Kubernetes, Consul, Nomad, Docker, Zookeeper, and dozens more) are gated by Go build tags, allowing operators to produce minimal binaries. This pattern is architectural documentation in itself.
  • Pull-over-push scraping model: The design intentionally inverts the push model common in other monitoring systems; targets expose /metrics endpoints and Prometheus scrapes them at configured intervals, simplifying instrumentation and removing the need for agents.
  • OpenTelemetry bridge: The project integrates as an OTLP receiver (via go.opentelemetry.io/collector components), bridging the Prometheus and OTel ecosystems without compromising the native data model.