Raxol.Core.Behaviours.Metrics behaviour (Raxol v2.0.1)
View SourceCommon behavior for metrics collection and reporting.
This behavior defines a consistent interface for components that collect, track, and report metrics about their operation.
Summary
Callbacks
Decrements a counter metric.
Records a gauge metric value.
Gets a specific metric value.
Gets all current metric values.
Records a histogram/timing metric.
Increments a counter metric.
Resets a specific metric to its initial value.
Resets all metrics to initial values.
Functions
Convenience functions with default implementations.
Types
Callbacks
@callback decrement(metric_name(), metric_value(), metric_tags()) :: :ok
Decrements a counter metric.
@callback gauge(metric_name(), metric_value(), metric_tags()) :: :ok
Records a gauge metric value.
@callback get_metric(metric_name()) :: metric_value() | nil
Gets a specific metric value.
@callback get_metrics() :: metrics()
Gets all current metric values.
@callback histogram(metric_name(), metric_value(), metric_tags()) :: :ok
Records a histogram/timing metric.
@callback increment(metric_name(), metric_value(), metric_tags()) :: :ok
Increments a counter metric.
@callback reset_metric(metric_name()) :: :ok
Resets a specific metric to its initial value.
@callback reset_metrics() :: :ok
Resets all metrics to initial values.