Expand description
Tide middleware for prometheus with a few default metrics.
§Example
let mut server = tide::new();
server.with(tide_prometheus::Prometheus::new("tide"));
// Optionally serve these metrics on the same server:
server.at("/metrics").get(tide_prometheus::metrics_endpoint);§Metrics
The {prefix} below is the string you put in Prometheus::new.
{prefix}_http_requests(prometheus::IntCounterVec) with labels:methodas the request method.statusas the response status.
§Features
processwill enable theprometheusprocessfeature, recording various metrics of the process.
Re-exports§
pub use prometheus;
Structs§
- Prometheus
- Tide middleware for
prometheuswith a few default metrics.
Functions§
- metrics_
endpoint - A convencience
tide::Endpointthat gathers the metrics withprometheus::gatherand then returns them inside the response body as specified by the Prometheus docs.