When a workflow or task fails today, the dashboard surfaces only the error message that bubbled up from the runtime. Full exception traces are streamed to the backend logs but are not accessible from the UI. This forces developers to leave the dashboard and dig through log aggregators to diagnose problems.
Goal
Expose the complete trace associated with a failed run directly in the dashboard so that developers can download it with a single click.
Current Behaviour
- Backend returns a JSON payload for failed runs that contains the
error_message string only.
- The dashboard lists each run with a red status chip and the error message (truncated after ~120 chars).
- There is no UI affordance to retrieve the trace.
Proposed Solution
Backend
- Augment failure payloads with a field that resolves to a stored trace (e.g. S3 object, database blob).
- Expose
GET /api/runs/{run_id}/trace that returns
Content-Disposition: attachment; filename="{run_id}_trace.txt"
- Raw text stack-trace in the body.
- Keep response size reasonable (<10 MB) via gzip or truncation of middle frames.
Dashboard UI
- Replace static error‐message cell with an interactive chip.
- On hover / click, open a popover showing the full error message and a "View Trace" button.
- Clicking the button downloads
run_<id>_trace.txt using the native browser download flow.
- No in-browser rendering required; developers can open in their IDE of choice.
Acceptance Criteria
Open Questions
- Storage location – Persist traces in S3 vs database? Expected retention?
- Large traces – Impose max file size or stream?
- Security – Do we need additional masking (e.g. secrets) before exposing traces?
Definition of Done
- Backend PR merged exposing the new endpoint and trace persistence logic.
- Dashboard PR merged implementing the UI changes.
- E2E test: trigger a synthetic failure and assert that the downloaded trace matches backend logs.
When a workflow or task fails today, the dashboard surfaces only the error message that bubbled up from the runtime. Full exception traces are streamed to the backend logs but are not accessible from the UI. This forces developers to leave the dashboard and dig through log aggregators to diagnose problems.
Goal
Expose the complete trace associated with a failed run directly in the dashboard so that developers can download it with a single click.
Current Behaviour
error_messagestring only.Proposed Solution
Backend
GET /api/runs/{run_id}/tracethat returnsContent-Disposition: attachment; filename="{run_id}_trace.txt"Dashboard UI
run_<id>_trace.txtusing the native browser download flow.Acceptance Criteria
Open Questions
Definition of Done