| Crates.io | prometheus-parse |
| lib.rs | prometheus-parse |
| version | 0.2.5 |
| created_at | 2020-10-05 07:58:22.000761+00 |
| updated_at | 2023-12-09 22:28:45.159935+00 |
| description | A simple parser for the Prometheus text format |
| homepage | https://github.com/ccakes/prometheus-parse-rs |
| repository | https://github.com/ccakes/prometheus-parse-rs |
| max_upload_size | |
| id | 296237 |
| size | 37,986 |
Simple but effective Rust parser for the Prometheus scrape format.
let body = reqwest::get("https://prometheus.example.com/metrics")?
.text()?;
let lines: Vec<_> = body.lines().map(|s| Ok(s.to_owned)).collect();
let metrics = prometheus_parse::Scrape::parse(lines.into_iter())?;
This crate is 99.99% lifted from prometheus-scrape with some minor API changes and a GitHub repo to encourage PRs.
Apache License 2.0 - same as original project