Monitoring and metrics system for ExUtcp.
Provides comprehensive monitoring capabilities including:
- Telemetry events for all UTCP operations
- Prometheus metrics integration
- Health checks for transports and providers
- Performance monitoring and alerting
- Custom metrics and dashboards
Summary
Functions
Emits a telemetry event for connection operations.
Emits a telemetry event for provider registration.
Emits a telemetry event for search operations.
Emits a telemetry event for tool call operations.
Gets health status for all components.
Gets current system metrics.
Starts the monitoring system.
Stops the monitoring system.
Functions
@spec emit_connection_event( String.t(), atom(), :connect | :disconnect | :error, integer() ) :: :ok
Emits a telemetry event for connection operations.
Emits a telemetry event for provider registration.
Emits a telemetry event for search operations.
@spec emit_tool_call_event( String.t(), String.t(), map(), integer(), :success | :error, any() ) :: :ok
Emits a telemetry event for tool call operations.
@spec get_health_status() :: %{ overall: :healthy, components: %{ prometheus: :healthy | :unhealthy, telemetry: :healthy | :unhealthy, transports: %{overall: :degraded | :healthy, transports: map()} }, timestamp: integer() }
Gets health status for all components.
@spec get_metrics() :: %{ system: %{ memory: %{ atom: non_neg_integer(), binary: non_neg_integer(), ets: non_neg_integer(), processes: non_neg_integer(), system: non_neg_integer(), total: non_neg_integer() }, processes: %{count: non_neg_integer(), limit: non_neg_integer()}, schedulers: %{online: pos_integer(), total: pos_integer()} }, timestamp: integer(), utcp: %{ connections: %{active: 0, failed: 0, total: 0}, providers: %{by_transport: map(), total: 0}, searches: %{by_algorithm: map(), total: 0}, tool_calls: %{avg_duration: float(), error: 0, success: 0, total: 0} } }
Gets current system metrics.
@spec start() :: :ok
Starts the monitoring system.
@spec stop() :: :ok
Stops the monitoring system.