ADORSYS-GIS / ADORSYS-GIS/ai-helm
[Ticket]: Observability — per-project attribution, dashboards & budget-burn alerts
- Lingua principale
- Go Template
- Stelle
- 3
- Fork
- 1
- Merge medio
- 19h 24m
- PR unite (30g)
- 80
Descrizione
### Type
Feature
Parent epic: #531. Intended labels: `ticket`, `observability`.
### Summary
Carry `x-project-id` through the attribution pipeline: Envoy access-log field → Alloy label promotion (ADR-0046 flatten stage) → `project_id` label on the ADR-0058 Mimir counters (`gen_ai_usage_cost_micro_usd`, `gen_ai_usage_tokens`, `gen_ai_requests`) and Loki streams. Add per-project Grafana panels (spend, tokens, top members, envelope burn-down) and ADR-0059 alert rules at 80% of project envelope.
### Intent
Leads see their project's consumption; governance sees all projects; the audit unit from the epic ("show me everything project X did") becomes a label filter.
### Acceptance Criteria
- [ ] `project_id` promoted as a label (bounded cardinality — projects, not members; per ADR-0011 discipline).
- [ ] Existing per-user dashboards unaffected; scoreboard (ADR-0060) gains a project dimension where cheap.
- [ ] Per-project dashboard generated via `tools/dashboards` (ADR-0008), shipped as a `GrafanaDashboard` CR.
- [ ] Alert rule: project envelope 80% burn → Discord (ADR-0059 contact point).
- [ ] Loki/Mimir query contract documented (label names, absent-value convention).
### Human accountable owner
@Koufan-De-King
### AI Usage Declaration
- [x] Drafting the ticket
- [x] I have declared AI usage above (ticked the relevant items, or "Not used").
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start with tools/dashboards and read ADR-0046, ADR-0058, ADR-0059, ADR-0011, and ADR-0008 to trace attribution, metrics, logs, dashboards, and alert conventions. Check the Envoy access-log and Alloy stages, then verify that project_id reaches the named Mimir counters and Loki streams without changing per-user views. Done means a generated GrafanaDashboard CR, the 80% Discord alert, and documented Loki/Mimir label and absent-value contracts.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- grafana, helm, kubernetes
- Ambito
- documentation, infrastructure, observability
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100