openmetrics

Crates.ioopenmetrics
lib.rsopenmetrics
version0.2.1
sourcesrc
created_at2020-02-27 18:47:43.385915
updated_at2020-04-24 17:45:07.863048
descriptionA Rust native parser for the OpenMetrics standard
homepage
repositoryhttps://github.com/pard68/openmetrics-rs
max_upload_size
id213223
size7,807
Ian S. Pringle (ispringle)

documentation

README

OpenMetrics-rs

An OpenMetrics parser in Rust 🦀

Example

extern crate openmetrics;
use std::fs;

fn main() {
    let unparsed_file = fs::read_to_string("test.prom").expect("cannot read file!");
    openmetrics::parse_metrics(unparsed_file);
}

TODO

  • bin -> lib
  • consume URLs
  • Add label and metric logic to convert parsed pest data into usable data
  • parse labels within each metricLine
  • reconsider best way to handle labels and special labels (such as quartile)
Commit count: 27

cargo fmt