Metrics Transfer Format

Services that want to expose Prometheus metrics simply need to expose an HTTP endpoint providing metrics in Prometheus's text-based exposition format. The output of such an endpoint is human-readable and can look like this in its simplest form:

# HELP http_requests_total The total number of processed HTTP requests.
# TYPE http_requests_total counter
http_requests_total{status="200"} 8556
http_requests_total{status="404"} 20
http_requests_total{status="500"} 68

Each non-commented line in this format represents a single sample (with metric name, labels, and sample value), making it easy to expose metrics from systems and services.

See the Prometheus documentation for full details on the exposition format.

The Prometheus metrics exposition format is also being evolved into an open standard called OpenMetrics, which Prometheus supports as well.