Log all messages sent from remote nodes

I’m setting up a system that has a network of servers using native Elixir/Erlang distribution to connect the nodes and send messages between them, using libcluster to discover available nodes. My security group has asked if there’s a way to capture and log all messages received through the inter-node sends so we could monitor for someone attempting to send messages which are not valid or expected. Searching through the different Elixir/Erlang modules, I’m not finding anything that allows me to do this. Has anyone else needed to do this and found a solution or have a suggestion?

Thanks,

Chris