Architecture: How to build observability/telemetry for Vitto without addin...

Documentation for Sessions

🏗️ Architecture: How to build observability/telemetry for Vitto without addin...

Date: 2026-03-18
Time: 00:15:34 UTC
Session: gspace1-231.7
Agent: backend
Confidence: 93%
Status: ✅ Documented


📋 Decision Context

Question:

How to build observability/telemetry for Vitto without adding external dependencies like Grafana Cloud or Jaeger?

Task: S231.2 — In-app observability system (alternative to GAP-08 OTEL)


🎯 Decision Made

Chosen:

Built in-app observability system using existing execution-traces MongoDB collection. VittoObservabilityService with 5 parallel aggregation pipelines (task count, success rate, avg/p95 latency, cost, provider breakdown). ObservabilityController at /vitto-api/observability/ with 4 endpoints. PerfAlertService with 15-min cron dispatching anomaly alerts to role>=60 users via ProactiveDispatcherService. Extended DailyDigestService with performance section. Frontend VittoTracesComponent with GoGrab glassmorphism design.

Options Considered:

  1. Grafana Cloud free tier (rejected: external dependency, user preference)
  2. Self-hosted Jaeger on Railway (rejected: another service to manage)
  3. Console/log OTEL exporter (rejected: no dashboard, limited value)
  4. In-app observability from existing data (chosen: zero infra, uses existing traces)

💭 Reasoning

User explicitly requested no external dependencies. execution-traces collection was ALREADY populated by MindService.recordExecution() after every task — zero write amplification needed. taskId flows through the entire system as a natural correlation key, replacing the need for W3C trace context headers. Data was verified to exist in vitto-mind (same cluster as all Vitto data — vitto.urgh5aw). gograb-analytics was rejected because it lives on a different cluster (gograbspace), requiring cross-cluster queries. This approach covers ~80% of what OTEL would provide. The remaining 20% (cross-service trace propagation) is over-engineering for 4 backends sharing taskId.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation