prismamedia / metrics

Symfony bundle to expose your own metrics to Prometheus
BSD 3-Clause "New" or "Revised" License
15 stars 5 forks source link

Prometheus: float parsing error #12

Closed Dropelikeit closed 2 years ago

Dropelikeit commented 2 years ago

Hello,

first of all thank you for providing your package! We use it to create our own metrics. Unfortunately we found that Prometheus could not pick up our metrics because it ran into a parsing error.

The problem could be traced back to the "\r" character: Error message: strconv.ParseFloat: parsing "0\r": invalid syntax

I have already created a PR that deletes "\r", because actually only "\n" has to be used. PR: https://github.com/prismamedia/metrics/pull/11

The problem was found on Linux with the following Prometheus version:

Build Information
Version 2.15.2
Revision d9613e5c466c6e9de548c4dae1b9aabf9aaf7c57
GromNaN commented 2 years ago

Resolved by https://github.com/prismamedia/metrics/pull/11. Thanks.