Skip to content

Commit

Permalink
Silence prometheus float format warnings
Browse files Browse the repository at this point in the history
```
2023-10-10T17:38:53.943589Z  WARN lading::target_metrics::prometheus: invalid float literal: aggregator_tags_store.tagset_refs_count = #0",ge="8"}
```
  • Loading branch information
GeorgeHahn committed Oct 10, 2023
1 parent 9d604db commit 2ad78b8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lading/src/target_metrics/prometheus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ impl Prometheus {
let name_and_labels = parts.next().unwrap();
let value = parts.next().unwrap();

if value.contains("#") {
trace!("Unknown format: {value}");
continue;
}

let (name, labels) = {
if let Some((name, labels)) = name_and_labels.split_once('{') {
let labels = labels.trim_end_matches('}');
Expand Down

0 comments on commit 2ad78b8

Please sign in to comment.