Module prometheus

Module prometheus 

Source
Expand description

Prometheus Metrics Exporter

Exports metrics in Prometheus text format for monitoring.

§Usage

let collector = MetricsCollector::new();
let exporter = PrometheusExporter::new(&collector);
 
// Get metrics in Prometheus format
let output = exporter.export();
// Output:
// # HELP halldyll_requests_total Total number of HTTP requests
// # TYPE halldyll_requests_total counter
// halldyll_requests_total 1234

Structs§

PrometheusExporter
Prometheus metrics exporter

Functions§

export_prometheus
Standalone function to export metrics