Crate serde_prom

Crate serde_prom 

Source
Expand description

§serde_prom

Crates.io Version Tests

A simple Prometheus serializer for serde.

§Usage

Structs§

MetricDescriptor
Metadata for each metric, including type, help text, and optional custom labels.
PrometheusSerializer
A custom serializer that flattens structs into Prometheus metrics.

Enums§

MetricType
Metric type (counter, gauge, histogram, summary, etc.)
PrometheusError
Error type for Prometheus serialization.

Functions§

to_prometheus_text
Primary helper to convert a T: Serialize into a Prometheus text string.
write_prometheus_text
Primary helper to write a T: Serialize into a n output stream as Prometheus text. This is useful for writing directly to a file or network stream.