Skip to content
New issue

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

Cumulative counters in histograms are exposed in scientific format #130

Open
surik opened this issue Aug 4, 2021 · 0 comments
Open

Cumulative counters in histograms are exposed in scientific format #130

surik opened this issue Aug 4, 2021 · 0 comments

Comments

@surik
Copy link

surik commented Aug 4, 2021

After updating prometheus.erl from 4.6.0 to 4.8.1 I noticed that le float counters are formatted using scientific notation.

I think this maybe be related to changes done here #121

bound_to_label_value(Bound) when is_float(Bound) ->
  float_to_list(Bound);

which does float_to_list(Bound,[{scientific,20}])

Although this can be processed by Prometheus but breaks the monotonicity of buckets, see screenshot (deployment at around 12:10 with new prometheus.erl)

image

Should we consider using float_to_list(Bound, [{decimals, 20}, compact]). for backwardcompatability and monotonicity?

surik added a commit to surik/prometheus.erl that referenced this issue Aug 4, 2021
surik added a commit to surik/prometheus.erl that referenced this issue Aug 4, 2021
surik added a commit to surik/prometheus.erl that referenced this issue Aug 4, 2021
surik added a commit to surik/prometheus.erl that referenced this issue Oct 29, 2021
surik added a commit to surik/prometheus.erl that referenced this issue Oct 30, 2021
surik added a commit to surik/prometheus.erl that referenced this issue Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant