The :telemetry events Juggernaut emits. Names and metadata keys are a public API: a
rename is a breaking change.
| Event | Measurements | Metadata |
|---|---|---|
[:juggernaut, :run, :start | :stop | :exception] | duration on stop (native) | run_id, lane, scope; stop adds verdict, exit_code, counts |
[:juggernaut, :phase, :start | :stop | :exception] | duration | run_id, phase |
[:juggernaut, :mutant, :stop] | duration (native), tests | run_id, mutant_id, operator, status, kill_kind, selection, worker, reused? |
[:juggernaut, :worker, :up | :recycle | :down] | duration (native) | run_id, worker, reason |
[:juggernaut, :cache, :lookup] | hits, misses, recorded_ms | run_id |
Spans use :telemetry.span/3, so start carries monotonic_time and system_time,
and a telemetry_span_context pairs start with stop. Stop metadata always includes the
start metadata. Mutant events are emitted by the controller, never by a worker node
(a dying worker emits nothing).
Handlers run in the emitting process: attach cheap ones. attach_forwarder/2 sends
every event to a process as {:juggernaut_telemetry, event, measurements, metadata}.
Summary
Functions
Forwards every Juggernaut event to pid as
{:juggernaut_telemetry, event, measurements, metadata}.
Emits the result-cache lookup counts of a run.
Detaches a handler attached with attach_forwarder/2.
Every event name Juggernaut emits.
Emits the outcome of one mutant. info holds mutant_id, operator, status,
kill_kind, selection, worker, reused?, duration_ms and tests (the number
of tests run).
Runs fun inside a phase span and returns {result, duration_ms}.
Runs fun inside the run span. meta needs run_id, lane and scope; fun
returns {result, stop_meta} (usually verdict, exit_code, counts). Returns
result.
Emits a worker event: :up (with its boot time), :recycle or :down.
Functions
Forwards every Juggernaut event to pid as
{:juggernaut_telemetry, event, measurements, metadata}.
@spec cache_lookup(String.t(), %{ hits: non_neg_integer(), misses: non_neg_integer(), recorded_ms: non_neg_integer() }) :: :ok
Emits the result-cache lookup counts of a run.
@spec detach(term()) :: :ok | {:error, :not_found}
Detaches a handler attached with attach_forwarder/2.
@spec events() :: [[atom()]]
Every event name Juggernaut emits.
Emits the outcome of one mutant. info holds mutant_id, operator, status,
kill_kind, selection, worker, reused?, duration_ms and tests (the number
of tests run).
@spec span_phase(String.t(), Juggernaut.Phase.name(), (-> term())) :: {term(), non_neg_integer()}
Runs fun inside a phase span and returns {result, duration_ms}.
Runs fun inside the run span. meta needs run_id, lane and scope; fun
returns {result, stop_meta} (usually verdict, exit_code, counts). Returns
result.
@spec worker( :up | :recycle | :down, String.t(), non_neg_integer() | :boot, String.t() | nil, non_neg_integer() ) :: :ok
Emits a worker event: :up (with its boot time), :recycle or :down.