CodeStory.Tracer (CodeStory v0.1.0)

Copy Markdown View Source

Configures Erlang tracing to feed events into the Collector.

Uses OTP 28's :trace module with session-based tracing. The Collector pid is set as the tracer — trace messages arrive directly as handle_info callbacks.

Summary

Functions

Starts tracing the given process for calls to the given modules.

Stops tracing and cleans up. Idempotent — safe to call multiple times.

Functions

start_tracing(collector_pid, modules, traced_pid)

Starts tracing the given process for calls to the given modules.

The collector_pid receives trace messages directly. Returns :ok or {:error, reason}.

stop_tracing()

Stops tracing and cleans up. Idempotent — safe to call multiple times.