rocket_prometheus_logger

Crates.iorocket_prometheus_logger
lib.rsrocket_prometheus_logger
version0.1.0
sourcesrc
created_at2019-02-10 20:32:25.276188
updated_at2019-02-10 20:32:25.276188
descriptionLog metrics from your rocket web server to prometheus 🚀
homepage
repositoryhttps://github.com/teovoinea/rocket_prometheus_logger
max_upload_size
id113952
size8,808
Teodor Voinea (teovoinea)

documentation

README

Build Status

rocket_prometheus_logger

Track your rocket endpoint performance in prometheus.

Usage

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"),
    })

Testing

cargo test --features "test"

0.2.0 Goals

  • Pull based logging
  • Configurable metrics
Commit count: 14

cargo fmt