I am using springboot as microservice.
I have around 20 microservices in my k8s cluster.
I am using promethues to collect data to show in grafana.
In that application there are some url which uses Path variable like as follow
- /v1/contacts/{id}
- /v1/users/{id}
There are few more urls, If I consider all such URLs in all microservices then that could be around 60 to 70 URLs which uses path variable.
Problem :
Now whenever any url is getting requested i.e like
- /v1/contacts/10
- /v1/contacts/111
- /v1/contacts/51
- /v1/users/91
so on...
Then promethus is collecting metrics for all such url. After some time it has huge metrics, and at the end my response time is increased for collecting data from prometheus.
So basically I want to clear prometheus logs after some interval from my springboot application.
I am not sure whether its possible or not.
Can someone please help me to solve this ?
Thanks