Ability to use hooks to listen to events on Start / Stop / Error of a Flow

Hey Team,
I am looking for some solution to know when a flow started and ended.
Something that allows you to use Hooks Api and listen for events like "onFlowStart" / "onFlowStop",
This will help us monitor the flows and keep track of time taken for various flows which can later be used to identify slowness / flow execution rate etc.

Flows only really start and stop when Node-RED starts and stops. Other than that they are driven by events. So a trigger node creates a message that appears to "start" a flow but really, the flow has been running all along, just that it had no messages.

There are various ways therefore to track timings. Depends on the details.

1 Like

Thanks for your explanation.
I want to track the timing and input/output of each node's send and receive calls, to store history for debugging.
I am considering adding hooks on onSend and onRecieve to get the events and inject a correlation ID at the trigger node.
Later I can relate this information based on correlation ID, flow ID, and node ID.
I would like to know, whether this is a good approach, or something better is there.

I think there is a contributed node for doing that? Can't find it in the flows but maybe a search through the forum will find it.