How can I get metrics on requests per seconds with the metrics exposed by the starlette exporter (link here). I have a Grafana instance, and have metrics like starlette_requests_total
and starlette_requests_in_progress
.
My scrape_interval
in my prometheus.yaml config file is 15s. However, I am only able to get data when I use
rate(starlette_requests_total{method="GET"}[4m])
Any interval less than 4m returns no data. I sent requests to the server but there seems to be no impact on the metrics.
I'm new to coding and observability. Any help would be much appreciated!
rate
requires at least to samples, so in your case[30s]
should be enough. Check if you have problems on scraping.