Skip to main content

Module exposition

Module exposition 

Source
Expand description

The Prometheus protobuf exposition format (io.prometheus.client.MetricFamily, length-delimited), served by GET /metrics to a scraper that asks for it. It is the only format that carries native histograms.

Families come from the text output of every other producer ([parse_text]: counters, gauges and classic histograms) plus http_server_request_duration_seconds built directly, with its classic buckets and its native (schema 3) ones side by side. Field numbers are those of prometheus/client_model metrics.proto.

Constants§

PROTOBUF_CONTENT_TYPE
The Content-Type of the protobuf format, also what a scraper’s Accept names.

Functions§

accepts_protobuf
Whether an Accept header asks for the protobuf format (with a q above 0).
protobuf
Every metric, protobuf-encoded.