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

Defines macros for executing telemetry events and registering processes with events. Provided macros evalueates to meaningful code or to nothing, depending on config values, in order to achieve performance boost, when specific event or whole telemetry is not in use.

Link to this section Summary

Functions

Evaluates to conditional call to :telemetry.execute/3 or to nothing, depending on if specific event is enabled in config file. If event is enabled, :telemetry.execute/3 will be executed only if value returned by call to func will be truthly.

Evaluates to call to :telemetry.execute/3 or to nothing, depending on if specific event is enabled in config file.

Evalueates to call to Membrane.TelemetryMetrics.Monitor.start/3 or to nothing, depending on if specific event is enabled in config file. Should be called in every process, that will execute event linked with metric aggregated by some instance of Membrane.TelemetryMetrics.Reporter.

Link to this section Types

Specs

label() :: list()

Link to this section Functions

Link to this macro

conditional_execute(func, event_name, measurements, metadata, label)

View Source (macro)

Evaluates to conditional call to :telemetry.execute/3 or to nothing, depending on if specific event is enabled in config file. If event is enabled, :telemetry.execute/3 will be executed only if value returned by call to func will be truthly.

Link to this macro

execute(event_name, measurments, metadata, label)

View Source (macro)

Evaluates to call to :telemetry.execute/3 or to nothing, depending on if specific event is enabled in config file.

Link to this macro

register(event_name, label)

View Source (macro)

Evalueates to call to Membrane.TelemetryMetrics.Monitor.start/3 or to nothing, depending on if specific event is enabled in config file. Should be called in every process, that will execute event linked with metric aggregated by some instance of Membrane.TelemetryMetrics.Reporter.