Xirsys.XTurn.Plugin.Metrics (xturn_plugins v0.1.0)

Copy Markdown View Source

Passive per-allocation QoS and metering exporter.

Counts byte_size(payload) on every frame. Telemetry events:

  • [:xturn, :metrics, :allocation, :sample] — periodic flush
  • [:xturn, :metrics, :allocation, :stop] — final snapshot from handle_close/2

Options

  • :flush_ms — sample interval in milliseconds (default 5000)
  • :clock_rates — payload type to clock rate map (default %{0 => 8000, 8 => 8000})
  • :usage_log — optional path; one JSON line appended per allocation on stop
  • :match — allocation filter passed to attach?/2