client_java
client_java copied to clipboard
How could I truncate data after pull
Hi, I using Prometheus to collect Spring Boot service metrics in Java. But I found a problem that data still exsit after pull, that made the instant data is not correct.
Like at now there has one label like 'app_version{version=a} 100', then the metrics updated, and add a new label value b, the metrics come to 'app_version{version=a} 50' and 'app_version{version=b} 50'; Then, label a no longer update, and metrics come to 'app_version{version=b} 100'.
When I pull metrics form Spring Boot service, the metrics is 'app_version{version=a} 50' and 'app_version{version=b} 100'. But expect data should be 'app_version{version=b} 100' only.
How could I fix this issue? Thanks.