Metrics
Bindu automatically collects performance metrics to help you monitor agent health and identify issues.Overview
Metrics provide quantitative measurements of your agent’s behavior:- Counters - Total count of events (tasks processed, errors)
- Histograms - Distribution of values (task duration, response time)
- Gauges - Current value (active tasks, memory usage)
Automatic Metrics
Task Metrics
| Metric | Type | Description |
|---|---|---|
bindu_tasks_total | Counter | Total tasks processed |
bindu_task_duration_seconds | Histogram | Task execution duration |
bindu_active_tasks | UpDownCounter | Currently active tasks |
bindu_task_errors_total | Counter | Total task errors |
Context Metrics
| Metric | Type | Description |
|---|---|---|
bindu_contexts_total | Counter | Total contexts created |
bindu_active_contexts | UpDownCounter | Currently active contexts |
Agent Metrics
| Metric | Type | Description |
|---|---|---|
bindu_agent_execution_time | Histogram | Agent execution duration |
bindu_agent_calls_total | Counter | Total agent invocations |
Metric Attributes
Each metric includes labels for filtering:operation- Operation name (send_message, get_task)agent_name- Agent identifierstatus- Success or errorerror_type- Exception class (on error)
Viewing Metrics
Prometheus
Configure Prometheus to scrape metrics:Grafana Dashboard
Create dashboards to visualize:- Task throughput over time
- Error rates
- P50/P95/P99 latencies
- Active task count