Monitoring - UnitBuilds-CC/V.E.L.O.C.I.T.Y.-MCP GitHub Wiki
Monitoring
Production-ready monitoring with Prometheus, Grafana, and OpenTelemetry.
Prometheus Metrics
Available at /metrics in HTTP mode:
curl http://localhost:3000/metrics
Available Metrics (20+)
| Metric | Description |
|---|---|
velocity_requests_total |
Total requests by method and status |
velocity_request_duration_seconds |
Request latency histogram |
velocity_active_connections |
Current active connections |
velocity_active_sessions |
Current active sessions |
velocity_tool_calls_total |
Tool calls by name and outcome |
velocity_tool_call_duration_seconds |
Tool execution latency |
velocity_sandbox_violations_total |
Sandbox violations by category |
velocity_audit_log_entries |
Audit log entry count |
velocity_rate_limiter_rejections_total |
Rate-limited requests |
velocity_nda_operations_total |
NDA compile/read/execute ops |
velocity_errors_total |
Errors by type |
velocity_cache_hits_total |
Cache hit/miss counts |
Alerting Rules
Pre-configured rules in monitoring/prometheus/alerts.yml:
- High error rate (>5% over 5 min)
- High latency (p95 > 1s over 5 min)
- Sandbox violations detected
- Rate limiter exhaustion
- Session limit approaching capacity
Grafana Dashboard
Pre-built dashboard in monitoring/grafana/dashboard.json:
- Request rate and latency
- Tool call breakdown
- Error rates and types
- Sandbox violations
- Cache hit rates
- Session/connection counts
OpenTelemetry
cargo build --release --features observability
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
velocity_mcp --mode http
All tracing spans automatically exported to your OTLP collector.
Health Endpoints
# HTTP mode
curl http://localhost:3000/health
curl http://localhost:3000/performance
# Any mode (JSON-RPC)
echo '{"jsonrpc":"2.0","method":"health/check","id":1}' | velocity_mcp --mode stdio
See also: Configuration, Transport-Modes