This a is proof-of-concept adding an IPC interface for tracing as discussed in https://github.com/bitcoin-core/libmultiprocess/issues/185. As mentioned there, this is a naive implementation that would need to be optimized to have good performance, but it does show an end-to-end demo of how tracing could work using IPC.
The can be tested by building with -DENABLE_IPC=ON
and running:
0build/bin/bitcoin-node -regtest -ipcbind=unix # Start node listening on IPC socket
1build/bin/bitcoin-trace -regtest -debug # Run bitcoin-trace and connect to socket
2build/bin/bitcoin-cli -regtest -generate # Create a block to generate sample traces