liveBook · Manning

Prometheus exposition format

As explained in Cloud Observability in Action

The Prometheus exposition format is a text-based format for representing metrics and their labels for collection by monitoring systems.

Prometheus exposition format is a text-based wire format for representing metrics and their labels. It has become a standard for metrics in cloud-native systems. section 3.2.3 section 2.7

Services expose metrics through an HTTP endpoint, conventionally /metrics. A Prometheus agent or OpenTelemetry collector can scrape that endpoint and forward data to a metrics destination. section 1.4 section 4.2

Inspecting a service endpoint

A locally forwarded front-end service can expose output such as `# HELP process_cpu_user_seconds_total`, `# TYPE ... counter`, and a numeric metric value at `http://localhost:8888/metrics`. section 1.4

Use the format as part of a metrics workflow:

  • Expose service or platform metrics in the format. section 1.4 section 3.2.3
  • Scrape the endpoint with Prometheus or an OpenTelemetry collector, then store or federate metrics through systems such as Prometheus, Cortex, or Thanos. section 1.4 section 4.2
  • Prune metrics that do not support alerts, dashboards, derived insights, or a clear operational use case. section 1.4 section 2.7

How Cloud Observability in Action covers it

How deep it goes
Explains representation and scrape flow, but stops short of a complete exposition grammar or detailed label-handling rules.
Examples
Shows front-end service output and Kubernetes API-server metrics, including counters, histograms, help text, types, and labels.
What you can do after
Operate/configure metric collection by inspecting /metrics endpoints, querying Kubernetes raw metrics, and selecting useful signals for retention.
How it connects
Connects metrics with Prometheus, OpenTelemetry, Kubernetes, agents, dashboards, alerting, logs, and traces.

Also explained in

Compare how 2 books explain Prometheus exposition format →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Cloud Observability in Action. The section links point to the parts of the book it draws on.