View Source Membrane.TelemetryMetrics.Reporter (Membrane Telemetry Metrics v0.1.1)
Attaches handlers to :telemetry events based on the received list of metrics definitions.
The attached handlers store metrics values in ETS tables.
These values can be gotten by calling scrape/2
function or also reset by calling scrape_and_cleanup/2
.
Currently supported types of metrics are:
Currently supported fields of metrics definitions are: :name
, :event_name
, measurement
.
Fields :keep
, :reporter_options
, tag_values
, tags
, :unit
and functionalities related to them are not supported yet.
Metrics values are grouped by label
.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Link to this section Types
@type report() :: map()
Link to this section Functions
@spec child_spec(Keyword.t()) :: Supervisor.child_spec()
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec scrape(reporter(), non_neg_integer()) :: report()
@spec scrape_and_cleanup(reporter(), non_neg_integer()) :: report()
@spec start_link([Telemetry.Metrics.t()], GenServer.options()) :: GenServer.on_start()
@spec stop(reporter()) :: :ok