HELP and TYPE lines
The two comment lines above each metric on a metrics page: # HELP gives a human description and # TYPE declares counter, gauge, histogram or summary.
In more detail
The type line lets the server know a counter from a gauge; the help text is what a person reads in a dashboard. Keep all samples of one metric together, directly under its help and type lines.
Example
# HELP http_requests_total Requests handled.
# TYPE http_requests_total counterRelated terms
- Prometheus exposition format — The plain-text format a metrics page uses: one sample per line with name, optional labels in braces and a value, plus comment lines for help text and type.
- counter — A metric that only ever goes up, such as the total number of requests or errors, from which rates are calculated.
- gauge — A metric that can go up and down and describes a level right now, such as queue depth, memory in use or open connections.
Taught in
- The Three Signals: Logs, Metrics And Traces — Full-Stack Observability: Metrics, Tracing & Logging
- Metric Types: Summaries And Histograms — Full-Stack Observability: Metrics, Tracing & Logging
- The Prometheus Exposition Format — Full-Stack Observability: Metrics, Tracing & Logging
- Forty Seconds At Two: Push, Pull And Service Discovery — Prometheus Certified Associate (PCA) Exam Prep
- Where Did Two Hours Go? Prometheus Architecture — Prometheus Certified Associate (PCA) Exam Prep
- Cart Versus cart: The Data Model And What A Scrape Returns — Prometheus Certified Associate (PCA) Exam Prep
- Thirty Second Checkouts Nobody Saw: Client Libraries — Prometheus Certified Associate (PCA) Exam Prep
- Milliseconds Versus Seconds: Naming Metrics And Labels — Prometheus Certified Associate (PCA) Exam Prep
- Instrumentation Sprint: Sixteen Calls On Code And Exporters — Prometheus Certified Associate (PCA) Exam Prep