https://github.com/teovoinea/rocket_prometheus_logger
Log metrics from your rocket web server to prometheus 🚀
https://github.com/teovoinea/rocket_prometheus_logger
logging metrics prometheus rocket rust webserver
Last synced: 3 months ago
JSON representation
Log metrics from your rocket web server to prometheus 🚀
- Host: GitHub
- URL: https://github.com/teovoinea/rocket_prometheus_logger
- Owner: teovoinea
- License: mit
- Created: 2019-02-10T19:22:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-05-07T15:00:53.000Z (about 5 years ago)
- Last Synced: 2026-01-02T13:27:58.698Z (6 months ago)
- Topics: logging, metrics, prometheus, rocket, rust, webserver
- Language: Rust
- Homepage:
- Size: 15.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://dev.azure.com/voineateodor/voineateodor/_build/latest?definitionId=2&branchName=master)
# rocket_prometheus_logger
Track your rocket endpoint performance in prometheus.
## Usage
First, import `rocket_prometheus_logger`:
```rust
extern crate rocket_prometheus_logger;
use rocket_prometheus_logger::prometheus_fairing;
```
Then, attach to your rocket!
```rust
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