kestra-io / kestra

:zap: Open-source workflow automation platform. Orchestrate any language using YAML, hundreds of integrations. Alternative to Airflow, n8n, RunDeck, Camunda, Jenkins...
https://kestra.io
Apache License 2.0
9.65k stars 796 forks source link

Display Trigger Logs in the UI #4245

Closed anna-geller closed 2 months ago

anna-geller commented 3 months ago

This is mostly a UI issue, with only small enhancements needed on the backend side (to expose + filter the logs).

Triggers can sometimes be difficult to troubleshoot. Imagine a scenario: you configured a new trigger but it doesn't generate any executions. What happened? There are many potential culprits and questions you may ask yourself:

It's difficult to answer these questions without additional observability to the trigger's behavior. That's where Trigger Logs come in handy.

Proposal

For each trigger, we should add an expand section in the UI that displays the trigger logs.

image

Implementation

We already log a lot for each triggerId, but we'll need to:

  1. Add a new log field to the trigger schema:
    • This field will be a boolean that enables or disables logging for the trigger.
    • By default, logging will be disabled for Realtime Triggers to avoid privacy concerns (as Realtime Triggers process/store data directly rather than through internal storage).
    • For other triggers, logging will be enabled by default.
  2. Add a new logLevel field to the trigger schema:
    • This field will specify the log level for the trigger.
    • By default, the log level will be set to TRACE for allTriggers.

Next steps

tchiotludo commented 3 months ago
anna-geller commented 2 months ago

as discussed @loicmathieu, ignore extra fields like the log field for Realtime Trigger if not needed

anna-geller commented 2 months ago

@loicmathieu for the UI: https://www.figma.com/design/ew0uXk0NRXJ2NBBJTNe2n1/01_UI?node-id=1446-8466&t=0n2sGBtfHm0IDPFq-4

image

loicmathieu commented 2 months ago

@MilosPaunovic, what needs to be done is to add an expand button (already available on element-plus) to the triggers page that will display the logs of the trigger as seen in the above screenshot.

There are 3 places where we list triggers: