Crates.io | rocket_prometheus_logger |
lib.rs | rocket_prometheus_logger |
version | 0.1.0 |
source | src |
created_at | 2019-02-10 20:32:25.276188 |
updated_at | 2019-02-10 20:32:25.276188 |
description | Log metrics from your rocket web server to prometheus 🚀 |
homepage | |
repository | https://github.com/teovoinea/rocket_prometheus_logger |
max_upload_size | |
id | 113952 |
size | 8,808 |
Track your rocket endpoint performance in prometheus.
First, import rocket_prometheus_logger
:
extern crate rocket_prometheus_logger;
use rocket_prometheus_logger::prometheus_fairing;
Then, attach to your rocket!
rocket::ignite()
.attach(prometheus_fairing::PrometheusLogger{
address: String::from("http://127.0.0.1:9091/"),
metric_name: String::from("endpoint_logging"),
username: String::from("user"),
password: String::from("pass"),
})
cargo test --features "test"