What does the Prometheus exposition format look like?
BeginnerConceptObservability Fundamentals & Signals
Answer
Plain text over HTTP, usually at /metrics:
# HELP http_requests_total Total HTTP requests.
# TYPE http_requests_total counter
http_requests_total{method="GET",code="200"} 1027
http_requests_total{method="POST",code="500"} 3
# TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes 2.3e+07
Each line is name{labels} value [timestamp]. OpenMetrics is the standardized successor (adds # EOF, exemplars, _created). Check any target with curl -s localhost:9100/metrics | head.
More on Observability Fundamentals & Signals
What is the difference between monitoring and observability?BeginnerWhat are the "three pillars" of observability, and what is the fourth signal people now add?BeginnerWhen would you reach for metrics, logs, traces or profiles during an incident?BeginnerWhat are the four Prometheus metric types?BeginnerWhy should you never use a gauge to count requests?BeginnerHistogram vs summary: what is the real difference, and which do you choose?Intermediate