Skip to content

docs(OBSERV-02): RFC — KPI analytics middleware and in-app dashboards#1713

Open
florian-muller wants to merge 2 commits into
swiftfrom
feat/observ-02-kpi-analytics-rfc
Open

docs(OBSERV-02): RFC — KPI analytics middleware and in-app dashboards#1713
florian-muller wants to merge 2 commits into
swiftfrom
feat/observ-02-kpi-analytics-rfc

Conversation

@florian-muller

Copy link
Copy Markdown
Contributor

Summary

  • Adds RFC for OBSERV-02: a request middleware to replace prometheus_fastapi_instrumentator, emitting per-request KPI events to OpenSearch with user_id and groups dims
  • Proposes a preset-based analytics query endpoint (/api/kpi/query) with ReBAC (OpenFGA) authorization scoping — clients pick a named preset, the backend owns the DSL and injects scope filters
  • Documents a Redis-free caching strategy relying on OpenSearch's request cache for closed time ranges and client-side TTL for consistency across replicas
  • Registers OBSERV-02 in id-legend.yaml

Status

Draft RFC — for review and discussion before implementation starts. See open questions in §5 of the RFC.

Test plan

  • Review RFC content and open questions (§5)
  • Confirm preset list covers initial management requirements
  • Confirm team_id / Keycloak group name mapping approach (open question 4)
  • Approve RFC before backlog entry and implementation begin

Proposes a request middleware to replace prometheus_fastapi_instrumentator,
an OpenSearch-backed preset query endpoint with ReBAC authorization scoping,
and a caching strategy that avoids Redis while staying consistent across replicas.
Adds per-metric availability status with direct links to existing call
sites, flags missing instrumentation (session creation, agent creation,
user attribution on turn_completed), and notes resource metrics can be
sourced from Postgres rather than KPI events.
@florian-muller florian-muller self-assigned this Jun 10, 2026
@florian-muller florian-muller marked this pull request as ready for review June 11, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant