Module prometheus_client::encoding::text
source · Expand description
Open Metrics text format implementation.
let mut buffer = String::new();
encode(&mut buffer, ®istry).unwrap();
let expected = "# HELP my_counter This is my counter.\n".to_owned() +
"# TYPE my_counter counter\n" +
"my_counter_total 1\n" +
"# EOF\n";
assert_eq!(expected, buffer);