dr-metrix-axum 0.1.0

Axum middleware and handler for Prometheus metrics via dr-metrix
Documentation

metrics-axum

Axum integration for the metrics-exporter workspace.

Provides:

  • PrometheusMetrics — shared state holding the registry, HTTP request metrics, and database collector handles. Drop-in for Axum's State.
  • HttpMetricsLayer — a Tower layer / middleware that automatically records http_requests_total, http_request_duration_seconds, and http_requests_in_flight for every request.
  • metrics_handler — an Axum handler that encodes and serves the Prometheus text exposition format on GET /metrics.
  • health_handler — a simple GET /health liveness probe.
  • Helpers to register the default Prometheus process collector and an optional Tokio runtime collector so they appear alongside the database metrics.