Module formatting

Source
Expand description

Helpers for rendering metrics in the Prometheus exposition format.

Functionsยง

key_to_parts
Breaks a key into the name and label components, with optional default labels.
sanitize_description
Sanitizes a metric description to be valid under the Prometheus exposition format.
sanitize_label_key
Sanitizes a label key to be valid under the Prometheus data model.
sanitize_label_value
Sanitizes a label value to be valid under the Prometheus data model.
sanitize_metric_name
Sanitizes a metric name to be valid under the Prometheus data model.
write_help_line
Writes a help (description) line in the Prometheus exposition format.
write_metric_line
Writes a metric in the Prometheus exposition format.
write_type_line
Writes a metric type line in the Prometheus exposition format.