Collects any telemetry event.
This is the collector behind a bare event name in :collect:
config :phoenix_replay,
collect: [
[:my_app, :checkout, :stop],
{[:my_app, :search, :stop],
metadata: [:query], keep: &(&1.results > 0), summary: &"search #{&1.query}"}
]Options
:event— the event name (required):metadata— metadata keys to keep. Defaults to[], keeping none, because metadata often holds whole sockets and structs.:keep— a function of the metadata returning whether to record the event, as inTelemetry.Metrics:summary— a function of the metadata returning the line shown in the replay. Defaults to the event name.:mark—truefor an event that marks a moment, such as a signup or a completed checkout, as an analytics event would, or the mark's name, such as"Checkout completed"; seePhoenixReplay.Collector.Captured. Defaults tofalse.
Measurements are kept, with times converted to milliseconds by
PhoenixReplay.Collector.milliseconds/1. An event whose name ends in
:exception is recorded as an error, described by its kind and
reason metadata.