Skip to main content

Analytics Dashboards

Analytics dashboards provide comprehensive monitoring and visualization capabilities for RecoAgent systems.

Overview

The analytics dashboard system offers real-time monitoring, customizable visualizations, and comprehensive reporting for all aspects of RecoAgent operations.

Core Features

  • Real-time Monitoring: Live updates of system metrics
  • Customizable Dashboards: Create and configure custom dashboards
  • Interactive Visualizations: Charts, graphs, and interactive elements
  • Alerting: Automated alerts for threshold breaches
  • Export Capabilities: Export data and reports

Usage Examples

Basic Dashboard Setup

from recoagent.analytics.dashboards import DashboardManager

# Create dashboard manager
dashboard_manager = DashboardManager()

# Create dashboard
dashboard = dashboard_manager.create_dashboard(
name="System Overview",
description="Main system monitoring dashboard"
)

# Add widgets
dashboard.add_widget(
widget_type="metric",
title="Total Queries",
metric="queries.total",
refresh_interval=30
)

dashboard.add_widget(
widget_type="chart",
title="Response Time Trend",
metric="response_time.avg",
chart_type="line"
)

Advanced Dashboard Configuration

# Create advanced dashboard with multiple widgets
advanced_dashboard = dashboard_manager.create_dashboard(
name="Performance Analytics",
description="Comprehensive performance monitoring"
)

# Add multiple widget types
widgets = [
{
"type": "metric",
"title": "Success Rate",
"metric": "success_rate",
"format": "percentage"
},
{
"type": "chart",
"title": "Error Distribution",
"metric": "errors.by_type",
"chart_type": "pie"
},
{
"type": "table",
"title": "Top Queries",
"metric": "queries.popular",
"limit": 10
}
]

for widget_config in widgets:
advanced_dashboard.add_widget(**widget_config)

API Reference

DashboardManager Methods

create_dashboard(name: str, description: str) -> Dashboard

Create a new analytics dashboard

Parameters:

  • name (str): Dashboard name
  • description (str): Dashboard description

Returns: Dashboard object

add_widget(widget_type: str, title: str, metric: str, **kwargs) -> Widget

Add widget to dashboard

Parameters:

  • widget_type (str): Type of widget
  • title (str): Widget title
  • metric (str): Metric to display
  • **kwargs: Additional widget configuration

Returns: Widget object

See Also