client_java icon indicating copy to clipboard operation
client_java copied to clipboard

How could I truncate data after pull

Open helloworlde opened this issue 3 years ago • 0 comments

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.

helloworlde avatar Aug 09 '22 07:08 helloworlde