How to generate call graphs from dfx function calls? (tracing/profiling)

Hello there,

I was wondering if dfx supports some verbose options that allow to stream/output all the function calls internally (incl. procedure calls)?

This would be used during the development process. Helpful to generate call graphs and demonstrate multi-canisters architectures.

My goal is to be able to generate a sequence diagram of a canister call, which would include internal functions and external canister calls.

An example: GitHub - naddison36/tx2uml: Ethereum transaction visualizer. Generates UML sequence diagram for a transaction's contract calls.

With a stream, I could pipe the data so that a webpage will display in real-time some functions calls via d3.js: node groups would represent canisters, each node will represent the public/private functions. ( generated from candid + need to export private functions)

1 Like

Unfortunately, we don’t have much in that direction yet. The emulator environment (dfx start --emulator) is what we hope will help with such things, at least when you run things locally. But it will take a while.