feat(ui): wire analytics dashboards to real observability data — usage, activity, sessions, cost, A/B#59
Merged
dgarson merged 4 commits intoobservability/mainfrom Feb 22, 2026
Conversation
…na, Loki, Promtail, Alertmanager
…h model/latency/tool breakdowns
…riments analytics views
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OBS-05: Analytics UI Wire-up
Wires the OpenClaw analytics/observability UI views to real data sources.
What changed
1. Refactored Analytics page (
/analytics)usage.statusto richsessions.usageAPI2. Cost Analysis view (
/analytics/cost)3. Agent Activity Dashboard (
/analytics/activity)sessions.usageevery 30s for aggregate stats4. Session Replay / Debug Timeline (
/analytics/sessions/:id)sessions.usage.logsfor chronological event listtraceIdavailable5. A/B Experiment Dashboard (
/analytics/experiments)experiments.listgateway methodNew/modified files
Frontend (apps/web)
app/(main)/analytics/page.tsx— refactored tosessions.usageAPIapp/(main)/analytics/layout.tsx— sub-layout for analytics sectionapp/(main)/analytics/cost/page.tsx— newapp/(main)/analytics/activity/page.tsx— newapp/(main)/analytics/experiments/page.tsx— newapp/(main)/analytics/sessions/[id]/page.tsx— newlib/gateway/types.ts— added rich usage types (SessionCostTotals, SessionsUsageResult, SessionLogEntry, Experiment types)components/charts/usage-chart.tsx— fixed cost formatting (USD not cents)components/charts/model-cost-chart.tsx— new horizontal bar chart componentAPI routes used
sessions.usage(existing) — main data source for all viewssessions.usage.logs(existing) — session replay timelineexperiments.list(future, from OBS-04) — graceful degradation when unavailableNo new gateway routes needed
All views wire to existing gateway WS methods. The rich
sessions.usageAPI already provides byModel, byProvider, byAgent, byChannel, daily breakdowns, tool usage, latency stats, and message counts.Target:
observability/main