Expand description
HTTP server metrics middleware (OpenTelemetry Semantic Conventions).
Records two instruments per request:
http.server.request.duration— histogram (seconds)http.server.active_requests— up-down counter
Attributes follow OpenTelemetry HTTP semantic conventions:
http.request.method, http.route, http.response.status_code.
Structs§
- Http
Metrics - Holds the two OpenTelemetry instruments for HTTP server metrics.
Functions§
- http_
metrics_ middleware - Axum middleware that records HTTP server metrics.
- propagate_
matched_ path - Tiny
route_layerthat copiesMatchedPathinto response extensions so that outerlayer()middleware (e.g. metrics) can read the route template.