Actix tools for PepeTeam template application.
Metrics service expose via /metrics
endpoint. (see also Middleware.Metrics)
rust
let srv = match HttpServer::new(move || {
App::new()
.wrap(pepe_actix::middleware::Metrics) // adding middleware
.service(pepe_actix::services::metrics::handler) // adding `/metrics` endpoint
})
This middleware collects http requests Prometheus-metrics, that should be exposed via /metrics
endpoint or using appropriate metrics service. (see for example Services.Metrics)
Name: http_requests_total
.
Labels: host
, method
, ip
, path
.