http_metware

Crates.iohttp_metware
lib.rshttp_metware
version0.1.1
sourcesrc
created_at2024-08-13 20:50:51.395983
updated_at2024-08-13 21:02:35.803445
descriptionHttp metrics
homepage
repositoryhttps://github.com/stepanpopov/http_metware
max_upload_size
id1336499
size7,515
Stepan Popov (stepanpopov)

documentation

README

This tower middleware can be usefull to easily integrate http metrics into your web server. It doesnt rely on any metrics lib, all you have to do is to access ExposedMetrics via MetricsExposer trait implemetation and log them or collect via any metrics lib like prometheus client.

pub struct ExposedMetrics<'a> {
    pub uri: &'a Uri,
    pub method: &'a str,
    pub status_code: u16,
    pub elapsed_time: &'a Duration,
}
Commit count: 0

cargo fmt