ExLLM.Infrastructure.CircuitBreaker.Metrics.Dashboard (ex_llm v0.8.1)

View Source

Dashboard and visualization helpers for circuit breaker metrics.

Provides data aggregation and formatting for building monitoring dashboards and alerting systems. Works with popular monitoring tools like Grafana, DataDog, and custom dashboard implementations.

Features

  • Real-time Metrics: Live circuit breaker status and performance data
  • Historical Analysis: Time-series data aggregation and trends
  • Alert Thresholds: Configurable alerting rules and conditions
  • Data Export: JSON/CSV export for external tools
  • Widget Helpers: Pre-built components for common visualizations

Usage

# Get dashboard data
{:ok, dashboard_data} = ExLLM.Infrastructure.CircuitBreaker.Metrics.Dashboard.get_dashboard_data()

# Get specific widget data
{:ok, health_data} = ExLLM.Infrastructure.CircuitBreaker.Metrics.Dashboard.health_widget()
{:ok, throughput_data} = ExLLM.Infrastructure.CircuitBreaker.Metrics.Dashboard.throughput_widget()

# Export data
{:ok, json} = ExLLM.Infrastructure.CircuitBreaker.Metrics.Dashboard.export_json()
{:ok, csv} = ExLLM.Infrastructure.CircuitBreaker.Metrics.Dashboard.export_csv()

Summary

Functions

Export circuit summary data as CSV.

Export dashboard data as JSON.

Get alerting rules and current alert status.

Get comprehensive dashboard data for all circuits.

Get health overview widget data.

Get response time widget data.

Get state distribution widget data.

Get throughput widget data.

Get top failing circuits widget data.

Functions

export_csv(opts \\ [])

Export circuit summary data as CSV.

export_json(opts \\ [])

Export dashboard data as JSON.

get_alerts(opts \\ [])

Get alerting rules and current alert status.

get_dashboard_data(opts \\ [])

Get comprehensive dashboard data for all circuits.

health_widget(opts \\ [])

Get health overview widget data.

response_time_widget(opts \\ [])

Get response time widget data.

state_distribution_widget(opts \\ [])

Get state distribution widget data.

throughput_widget(opts \\ [])

Get throughput widget data.

top_failing_circuits_widget(opts \\ [])

Get top failing circuits widget data.