Search code examples
monitoringmetricsprometheus

Prometheus eats last decimals zero


I have next metric on my webservice: app_version{labels} 57.1280

But when Prometheus collect data: app_version{labels} 57.128

How can I keep whole metric?


Solution

  • Prometheus works with floats, and both of them are the same value. If you need an exact string you should use a label for this value such as explained in this blog post.