View Source Membrane.TelemetryMetrics.Reporter (Membrane Telemetry Metrics v0.1.0)

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

Link to this section Types

Specs

report() :: map()

Specs

reporter() :: pid() | atom()

Link to this section Functions

Specs

child_spec(Keyword.t()) :: Supervisor.child_spec()

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

scrape(reporter, timeout \\ 5000)

View Source

Specs

scrape(reporter(), non_neg_integer()) :: report()
Link to this function

scrape_and_cleanup(reporter, timeout \\ 5000)

View Source

Specs

scrape_and_cleanup(reporter(), non_neg_integer()) :: report()
Link to this function

start_link(init_arg, options \\ [])

View Source

Specs

Specs

stop(reporter()) :: :ok