You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2026/05/27 20:55:00 UTC
[jira] [Commented] (CAMEL-23631) Route diagram - highlight error path from ErrorRegistry message history
[ https://issues.apache.org/jira/browse/CAMEL-23631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18083960#comment-18083960 ]
Claus Ibsen commented on CAMEL-23631:
-------------------------------------
TODO: add diagram toggle in TUI to show this in insight and error
> Route diagram - highlight error path from ErrorRegistry message history
> -----------------------------------------------------------------------
>
> Key: CAMEL-23631
> URL: https://issues.apache.org/jira/browse/CAMEL-23631
> Project: Camel
> Issue Type: Improvement
> Components: camel-diagram, camel-jbang
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 4.21.0
>
>
> The ErrorRegistry captures rich error snapshots including message history — the sequence of route nodes the exchange visited before the error occurred. Each history entry contains the routeId and nodeId (e.g., route1[log1] (5 ms)).
> The route diagram rendering pipeline (camel-diagram) renders route structures as PNG images or ASCII/Unicode text, but currently has no concept of highlighting specific nodes or paths.
> This improvement would allow rendering a route diagram where the error path is highlighted, making it easy to visually trace the exact route the failed exchange took.
> *Implementation approach:*
> 1. Propagate node ID through the diagram pipeline — add id field to NodeInfo and LayoutNode, read it in RouteDiagramHelper.parseRoutes()
> 2. Add Set<String> highlightedNodeIds parameter to both renderers (RouteDiagramRenderer for PNG, RouteDiagramAsciiRenderer for text)
> 3. Highlight matching nodes with a distinct visual style (colored border/glow for PNG, ANSI colors for text)
> 4. Add CLI support, e.g. camel route-diagram --highlight "from1,log1,to3" or camel route-diagram --error <uid> to fetch history from a running process
> The join key (node ID) already exists in both data sources — the route structure JSON has code[].id and the error history has routeId[nodeId] — but the diagram pipeline currently discards the ID during parsing.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)