grafana / explore-logs

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

LogsVolumePanel: support filtering logs from the selected level #474

Open matyax opened 2 weeks ago

matyax commented 2 weeks ago

Closes https://github.com/grafana/explore-logs/issues/422

This PR adds support to apply level filters from the Logs Volume panel.

https://github.com/grafana/explore-logs/assets/1069378/e2a1535f-cb05-41e6-9a19-67fc9f725dd3

matyax commented 2 weeks ago

There's one scenario that we need to consider: the user previously had applied a level filter.

Interacting with the Logs Volume panel adds detected_level filters. Options:

matyax commented 2 weeks ago

When the user is appending levels, we don't change the filters because we don't yet support filters with multiple values.

matyax commented 1 week ago

Thanks @cyriltovena ! What does @grafana/observability-logs / @zizzpudding this of this? How does this behavior feels to you?

gtk-grafana commented 1 week ago

@matyax what if we just ignored level/detected_level in the logs volume, although then we'd want to be able to set legend visibility when a level/detected_level filter is applied, but it looks like we can do that with series visibility overrides? 🤔

"matcher": {
          "id": "byNames",
          "options": {
            "mode": "exclude",
            "names": [
              "A-series1"
            ],
            "prefix": "All except:",
            "readOnly": true
          }
        },