Hello everyone ! I have the following question:
I have created a flask application that upon request in it's /metrics endpoint, retrieves specific values (strings) from Redis in the form
"test_service_metric{service="ui",component="graphs",env="mm"} 180" ,
concatenates them according to prometheus exposition format (each entry separated by newline character and a line at the end), and finally returns in the Response a string like the following:
"test_service_metric{service="ui",component="graphs",env="mm"} 160
test_service_metric{service="ui",component="graphs",env="mm"} 170
test_service_metric{service="ui",component="graphs",env="mm"} 180"
So what i am actually trying to achieve, is prometheus to retrieve all these entries by scraping (which refer to the same metric but with different values) and display them in the console/graph. But what actually happens, is that only one of them actually shows in Prometheus.
Is there something i am doing wrong ? Or because the scrape time is the same for all these entries, all but one are regarded as duplicates and removed ?
Thanks in advance and please let me know for any clarifications !