Raxol.Metrics (Raxol v2.0.1)
View SourceHandles collection and management of system metrics with functional error handling.
This module is responsible for collecting and managing various system metrics including:
- CPU usage
- Memory usage
- Active sessions
- Database connections
- Response times
- Error rates
REFACTORED: All try/catch blocks replaced with functional error handling patterns.
Summary
Functions
Returns a specification to start this module under a supervisor.
Records a gauge metric value.
Returns the current metrics.
Increments a counter metric.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Records a gauge metric value.
Parameters
- name: The name of the metric
- value: The value to record for the metric
Examples
Raxol.Metrics.gauge("raxol.chart_render_time", 42.5)
Returns the current metrics.
Returns a map containing the current system metrics.
Increments a counter metric.
Parameters
- name: The name of the metric to increment
Examples
Raxol.Metrics.increment("raxol.chart_cache_hits")