kestra icon indicating copy to clipboard operation
kestra copied to clipboard

[UI] Allow jumping to the next log of a specific log level type

Open anna-geller opened this issue 1 year ago • 6 comments

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.

image

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:

image

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.

anna-geller avatar Sep 06 '23 08:09 anna-geller

Would be awesome, thanks @anna-geller !

aballiet avatar Sep 06 '23 09:09 aballiet

Executions

anna-geller avatar Oct 11 '23 13:10 anna-geller

Looks amazing @anna-geller

aballiet avatar Oct 11 '23 14:10 aballiet

Hello, I've cleaned up the file!

Executions_Logs

Figma

Nico-Kestra avatar Mar 25 '24 10:03 Nico-Kestra

Hello, I've cleaned up the file!

Executions_Logs [Figma](https://www.figma.com/file/ew0uXk0NRXJ2NBBJTNe2n1/UI?type=design&node-id=645%3A4590&mode=design&t=7So8q4uLoBLC3djL-1)

AMAZING !!! @Nico-Kestra

aballiet avatar Mar 25 '24 10:03 aballiet

update, we synced with Brian that:

  1. 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
  2. cursor must be implemented and needs to be highlighted so that user knows on which log level they currently are

image

anna-geller avatar Aug 20 '24 15:08 anna-geller

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.

brian-mulier-p avatar Aug 30 '24 17:08 brian-mulier-p