I am developing a flow where I need to log the start and end event of each node with some custom information attached in the logs. For example,
Starting Log: Node named A type json has started its execution for data $msg.payload
Ending Log: Node named A type json has been executed for data $msg.payload
I tried using the complete node and a debug along with it but we do not get the source of node from where the control reaches to complete node in the msg.
I tried to use status node and then a function but not all nodes emit status event which gets caught on the node. I want to avoid explicitly altering all the common nodes.
Please suggest a way/existing library to perform the above task.
WHilst it doesn't give you exactly what you want, you can enable the metrics log level which will emit events around flow execution. It does not include message contents, but does include the node id.