Tracy

tracy_web - web interface

Provides a web user interface for the Tracy function tracer.

The web UI is a separate phoenix app which runs as a separate node. It serves a web interface (ReactJS powered) which allows you to configure how to trace a request.

User interaction

Now a new trace log opens which streams the results in real time. The tracing stops when the traced process exists or the trace limit is hit.

tracy - tracing library

The tracing library is a separate OTP app which runs on the node to be traced, similar to Recon.

The tracing is limited to function call tracing, for a specific process. The actual tracing is done on the specific node where the process runs.

Traces are defined by their "definition". Each definition defines which function calls are going to be traced, specified on the module level. To start a trace, a process must know its trace "definition" key, and call Tracy.check_start_trace/1 using this key. This key can be put in a HTTP request header, for instance. The Tracy.Plug extension automatically starts tracing a request whenever the x-tracy-definition request header is set to a valid definition key.

On the node, the following information is collected for each function that a traced process hits:

Note that one process can be traced at a time per node. This is a limitation of Erlang's tracing API. In practice, this is not a big deal.

Installation

To start your Phoenix server:

Now you can visit localhost:4100 from your browser.