Node-RED Tracer plugin

I was thinking about an app like sentry/jaegger but for node-red with the following features;

  • The app would draw a Gantt Timeline graph using traceIds, spanIds and parentSpanIds.
  • When hovering over a span, the editor would focus and highlight the node the span belongs too, and the user would see all logs ordered by date produced by that node.
  • when right clicking a span, a context menu would appear with an option to highlight the flow path up to that node. When selected, the path would be highligted in the editor.
  • There would exist a traceId picker to let the User choose the execution he is interested.
  • An AI would analyse the tracing data and suggest points to improve.

Is there something like this?

The app could be jagger. Since it is open source, it is possible to customize its UI to hook to a node-red webscoket to let them communicate.

It could be called :drum: :drum: :drum: "Node-RED Tracer"

This would simplify debugging, and speed development as Users would no longer need to invest time adding debug nodes. That debug tab gets too complicated to read if you add tons of debug nodes. I noticed I spent quite some time adding and toggling debug nodes, and redeploying my flow whenever I needed to verify specific parts of my flow

  • Node-RED Tracer button would appear in the Node-RED editor if configured in settings.json.
  • Node-RED Tracer embedded service would start if configured in settings.json

Long live Node-RED Tracer !!! No more debug nodes and tab

I dont have dopamine to develop it, but I could help if someone is interested and sees value in it.

@AllanOricil very interesting! Would you mind going into detail a bit more about the problem? See these points:

  • This would simplify debugging, and speed development as Users would no longer need to invest time adding debug nodes.
  • That debug tab gets too complicated to read if you add tons of debug nodes.
  • Noticed I spent quite some time adding and toggling debug nodes, and redeploying my flow whenever I needed to verify specific parts of my flow

Would you be able to provide context around these quotes without going into a solution space too much? More as in, this is what I am doing, this is the problem I experience.

Would be very helpful :folded_hands:

Could this potentially use the existing node-red logs? The trace and audit level logs are extremely detailed (though, for contributed nodes, trace logs might be of variable quality). They are fairly useless though in log form unless you create a custom logger to filter things down to a manageable level.

What you seem to be proposing could easily consume the node-red trace/audit level logs and present them in a more graphical form which could be very useful.

However, the one thing I'm not sure about is whether trace logs will have sufficient metadata to link them to actual node instances and flows?

BTW, I have a custom logger that sends uibuilder trace logs to MQTT. I have a uibuilder instance that takes that and displays it in a web log. It shows trace-level uibuilder logs but only info-level other node and system logs.

As a developer I want a solution that would allow me to easily see the path my injected event took while isolating all the noise created by other debug messages. At the moment, the current debug tab, is not enought because multiple "transactions" can be happening at the same time, which makes it very hard to see which debug messages belong to which transactions. With an enhanced debug tab, thinking of it as a tracer, I could select the transaction I'm interested, including its subtransactions (due to flow branches), and see the whole lifecycle of the injected event/message in a isolated view. It would be really fast to test and validate all flow paths. The same tracer view could later be used to ease the creation of "Automated Tests" for every single flow path, and let users replay them separately.

Is it clear @dimitrieh ? If not I can try to rewrite it with AI

Every time this comes up, I point to introspection which has a message tracer feature. But that's just me.

If you really want to reimplement this, then take a peak at the API offered by Node-RED - it basically provides everything needed to get updates/events when messages are passed around.

2 Likes