I’ve managed to make a Grafana dashboard which has a visualisation that can tell how many log lines are being dropped per 5mins due to being over the per_stream_rate_limit. This was done by using prometheus to scrape the loki instance metrics. That was done using this query:
increase(loki_discarded_samples_total{job=“loki”, reason=“per_stream_rate_limit”}[5m])
“loki” is the job name in my prometheus.yml. However, I want to be able to tell which stream/streams is/are going over the rate limit. I am using the promtail agent to tail the different logs to create a stream. I need to be able to tell which of these promtail log streams has gone over the per_stream_rate_limit. Please help.