Membrane.TelemetryMetrics (Membrane Telemetry Metrics v0.1.2)

View Source

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.

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.

Types

label()

@type label() :: list()

Functions

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

(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.

execute(event_name, measurments, metadata, label)

(macro)

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

register(event_name, label)

(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.