grafana / explore-logs

Repo for the Loki log exploration app
GNU Affero General Public License v3.0
234 stars 7 forks source link

Logs: allow filtering from logs volume #422

Open matyax opened 3 weeks ago

matyax commented 3 weeks ago

Use case: click on error levels in the volume chart, logs are filtered and updated by the selection.

imagen

svennergr commented 3 weeks ago

Would we just filter in the frontend or do a new query? The issue with doing a new query is, that the volume legend would change, so I'm +1 for filtering.

matryer commented 3 weeks ago

@svennergr could you do a new query but NOT update the log volume graph? I.e. just do a new query in the logs panel?

matyax commented 3 weeks ago

The challenge of frontend filtering is that you might end up showing, e.g., 2 error lines when, for the selected time interval, you have 200 but were truncated by the response limit (1000 or 5000).

svennergr commented 3 weeks ago

Agree. On the other hand, the challenge with running new queries is that you might lose context. Imagine the flow:

  1. Filter for error logs
  2. User found an interesting error log
  3. Now the user wants to see info logs additionally to see the context of the error
  4. Running a new query might lose context quite easily

And I think we are aligned that Log Context is the proper tool to do this, but still.