We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a metric compaction_level2_duration_ns that is sanitized into compaction_level__duration_ns. I believe this metric is a valid prometheus name..
compaction_level2_duration_ns
compaction_level__duration_ns
Here is a test that shows that it fails:
#[test] fn check_sanitize() { let name = "compaction_level2_duration_ns".to_owned(); let actual = sanitize_metric_name(&name); assert_eq!(name, actual); }
The sanitize code is here:
metrics/metrics-exporter-prometheus/src/formatting.rs
Lines 111 to 115 in 5f720a0
I think it is because it replaces the first n occurrences matching the predicate, regardless of their position.
The text was updated successfully, but these errors were encountered:
Add failing test from metrics-rs#289
cc2c289
Yep, you're definitely right.
@gnuvince has graciously submitted a PR to fix this over in #290.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
I have a metric
compaction_level2_duration_ns
that is sanitized intocompaction_level__duration_ns
. I believe this metric is a valid prometheus name..Here is a test that shows that it fails:
The sanitize code is here:
metrics/metrics-exporter-prometheus/src/formatting.rs
Lines 111 to 115 in 5f720a0
I think it is because it replaces the first n occurrences matching the predicate, regardless of their position.
The text was updated successfully, but these errors were encountered: