You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all thanks for this project, specially gravel-gateway. I think that currently is the most usable/helpful Prometheus gateway out there.
Context
I encontered this problem while using gravel-gateway. However seems that the problem is related with the usage of this library, so I open the issue here, if you prefer to have the issue on the other repo, I will move it happily.
Problem
The problem itself is when I push a counter metric and randomly crashes the gateway with this error:
thread 'tokio-runtime-worker' panicked at 'called `Option::unwrap()` on a `None` value', /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/openmetrics-parser-0.4.2/src/public/model.rs:900:50
Findings
After reading some code (I don't know Rust) and making some tests I found that this happens when a counter has an integer value. E.g:
example_test_counter_total{foo="bar"} 0
And then a float is pushed. e.g:
example_test_counter_total{foo="bar"} 0.01
After this second push, the gateway crashes, but, if the metric starts with a float from the begining, there are no crashes, however is very common to initialize a metric to 0, leading to this use case.
Hi!
First of all thanks for this project, specially gravel-gateway. I think that currently is the most usable/helpful Prometheus gateway out there.
Context
I encontered this problem while using
gravel-gateway
. However seems that the problem is related with the usage of this library, so I open the issue here, if you prefer to have the issue on the other repo, I will move it happily.Problem
The problem itself is when I push a
counter
metric and randomly crashes the gateway with this error:Findings
After reading some code (I don't know Rust) and making some tests I found that this happens when a counter has an integer value. E.g:
And then a float is pushed. e.g:
After this second push, the gateway crashes, but, if the metric starts with a float from the begining, there are no crashes, however is very common to initialize a metric to 0, leading to this use case.
Extra info
More information that could help:
v1.6.2
github.com/prometheus/client_golang v1.17.0
process_cpu_seconds_total
counter metric.The text was updated successfully, but these errors were encountered: