Open-Source Wikis

/

Prometheus

/

Subsystems

prometheus/prometheus

Subsystems

The Prometheus repository is one Go module split into many packages. Each package below has a focused responsibility and is consumed by cmd/prometheus/main.go. The names mirror the area prefixes used in PR titles (AGENTS.md).

Subsystem Path What it owns
TSDB tsdb/ The local time series database: head, WAL, blocks, index, chunks, compaction.
PromQL promql/ Lexer, yacc parser, AST, and the query engine.
Scrape scrape/ Scrape manager, scrape pools, scrape loops; turns target groups into samples.
Discovery discovery/, plugins/ Service discovery framework and ~25 individual SDs.
Rules rules/ Recording- and alerting-rule manager and evaluator.
Notifier notifier/ Alertmanager dispatch.
Storage storage/ Storage and Appender interfaces, fanout, exemplar storage helpers.
Remote write/read storage/remote/ Outbound remote write, inbound remote-write/OTLP receivers, remote read.
Web / HTTP API web/ HTTP server, federation, embedded UI assets, the v1 API.
Config config/ YAML schema for prometheus.yml, parsing, validation, reload.
Model model/ Cross-cutting domain types: labels, histogram, exemplar, relabel, textparse.
Util util/ Shared helpers: pools, compression, annotations, features registry, kahansum, logging.
Tracing tracing/ OpenTelemetry tracing setup.
Template template/ Go-template helpers used by alert templates.

The entries below list the smaller packages explicitly so nothing is silently missed.

Reference for smaller packages

Path Purpose
prompb/ Generated protobuf for remote write/read. v1 in prompb/, v2 in prompb/io/....
schema/ Metric type / unit metadata helpers shared by ingestion paths.
documentation/ User docs (documentation/*.md), example configs, and the prometheus-mixin Jsonnet.
docs/ Auto-generated and curated user docs (CLI, configuration, querying).
compliance/ Separate Go module: Remote Write 1.0 spec compliance tests for senders.
internal/tools/ Pinned versions of internal Go tools (promu, goyacc, …).
web/ui/ The React UIs (Mantine 3.x and legacy 2.x) and the shared CodeMirror modules.

For a top-down view of how these fit together, see Architecture.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Subsystems – Prometheus wiki | Factory