Distributed tracing for dala Elixir cluster nodes.
Provides tracing capabilities across connected dala nodes to debug message flows, function calls, and GenServer lifecycle events.
Examples
# Start tracing on all connected nodes
{:ok, trace_id} = DalaDev.Tracing.start_trace(:all_nodes, modules: [MyApp, Dala.Screen.Screen])
# Trace specific node
{:ok, trace_id} = DalaDev.Tracing.start_trace(:"dala_qa@192.168.1.5")
# Get trace events
events = DalaDev.Tracing.get_events(trace_id)
# Export to Chrome Tracing format
DalaDev.Tracing.export_chrome_trace(trace_id, "trace.json")
# Stop tracing
:ok = DalaDev.Tracing.stop_trace(trace_id)
Summary
Functions
Export trace events to Chrome Tracing format (JSON).
Get collected trace events for a trace ID.
Start tracing on specified node(s).
Stop tracing and collect final events.
Trace a specific function call on a remote node.
Types
Functions
Export trace events to Chrome Tracing format (JSON).
This format can be loaded in Chrome DevTools (chrome://tracing)
or the perfetto UI for visualization.
@spec get_events(trace_id()) :: [trace_event()]
Get collected trace events for a trace ID.
@spec start_trace(node() | :all_nodes | [node()], trace_opts()) :: {:ok, trace_id()} | {:error, term()}
Start tracing on specified node(s).
Options:
:modules- List of modules to trace (default: all):pids- List of PIDs to trace (default: all):events- Events to trace (default: [:function_call, :message_send, :message_receive]):match_spec- Match specification for :dbg (advanced)
Returns a trace ID that can be used to retrieve events.
Stop tracing and collect final events.
@spec trace_call(node(), module(), atom(), list(), keyword()) :: {:ok, term(), [trace_event()]} | {:error, term()}
Trace a specific function call on a remote node.
Returns the result and trace events during execution.