kestra
kestra copied to clipboard
[UI] Allow jumping to the next log of a specific log level type
Issue description
Problem
Currently, Kestra allows filtering for specific log levels. This allows users to filter only for WARN or ERROR level logs, as shown in the image below.
The problem with this approach is that it often lacks context. Seeing the WARN-level logs only (without the logs that came before or after), sometimes doesn't provide enough information necessary for troubleshooting. Some users would instead like to see a couple of logs that came before or after that specific WARN or ERROR log.
Recommendations from the community
One possible solution could be an option to set a higher log level e.g. DEBUG or INFO level, and allow users to "jump" to a specific lower-level log message. One user recommended this solution from dbt Cloud:
This lists a lower log level than the one selected in the dropdown and allows users to jump to the next log of a specific level.
Would be awesome, thanks @anna-geller !
Looks amazing @anna-geller
Hello, I've cleaned up the file!
[Figma](https://www.figma.com/file/ew0uXk0NRXJ2NBBJTNe2n1/UI?type=design&node-id=645%3A4590&mode=design&t=7So8q4uLoBLC3djL-1)
AMAZING !!! @Nico-Kestra
update, we synced with Brian that:
- the filter must be kept and then we only show the levels below that so e.g. if you select INFO from the dropdown, trace and debug won't be shown, you can only jump to the next logs starting from info
- cursor must be implemented and needs to be highlighted so that user knows on which log level they currently are
So... after coding a bit, found out it's a really complex subject especially due to the fact that we're handling subflows transparently for the user leading to recursive components. The draft (or reminder due to how poorly it's redacted) looks like this:
INFO[0-0]
WARN[0-1]
// second taskrun, first taskrun
WARN[1-0-0] > => @cursor=0-0 => cursor@0 = [1-0-0]
DEBUG[1-0-1]
INFO[1-0-2]
// second taskrun, second taskrun, first taskrun
INFO[1-1-0-0]
ERROR[1-1-0-1]
WARN[2-0]
next(warn)
cursor@0 = [2-0]
==> [2-0] doesn't start with 1 so cursor@1 = undefined
next(error)
cursor@0 = [1-1-0-1]
==> [1-1-0-1] starts with 1 so cursor@1 = [1-0-1]
cursor@1 = [1-0-1]
cursor@1-1 = [0-1]
the top-level component is the only one with "handle-cursor=true"
a bit technical but it helps digging out further the subject.
I just saw that the issue got moved to 0.20.0. Maybe this subject can be postponed (I think it was in the current backlog when I took the issue). I can also go till the end but it can get complex quickly.