You can limit the maximum number of lines returned by Loki within the Loki configuration.
max_entries_limit_per_query is the option you can configure. If the number of lines requested in Grafana is higher, the number of lines will be limited to what you configure in this max_entries_limit_per_query option.
thanks @dannykopping for the information.
as you mentioned this config belongs to loki and not grafana, now if I change the loki config is there a way for garafana to reflect this limit in its UI for I need to change it manually both in loki and grafana?
as you mentioned this config belongs to loki and not grafana , now if I change the loki config is there a way for garafana to reflect this limit in its UI
I don’t believe so, no. You’ll need to configure both to the same value.