Skip to content

Add client-perf-diagnosis skill#5599

Open
habdelra wants to merge 2 commits into
cs-12288-client-perf-telemetryfrom
client-perf-diagnosis-skill
Open

Add client-perf-diagnosis skill#5599
habdelra wants to merge 2 commits into
cs-12288-client-perf-telemetryfrom
client-perf-diagnosis-skill

Conversation

@habdelra

Copy link
Copy Markdown
Contributor

Background

The client performance telemetry adds an always-on browser instrument that beacons six event types to Loki and a Grafana dashboard, so real client behavior is measurable and attributable to a specific user or session. This adds the operator-facing counterpart: a diagnostic skill that turns a field complaint into a measured investigation against that telemetry.

The motivating shape of the complaint is concrete — "user XYZ said the app was slow loading their card" — and the whole reason attribution is in the pipeline is to answer it. So the skill leads with the user-attributed drill-down: pivot to the account's matrix_user_id, pin the session, find the slow card-load (the "Loading card…" window) and its settle_ms, then spider into the sibling events in that same session that explain the cost.

What the skill covers

A mode per investigation, all sharing the matrix_user_id / session_id drill-down:

  • A user reports a slow card load — the hub mode; from the pinned session, spider into slow server round-trips, a main-thread freeze, heavy deserialization, rebuild churn, or index-event churn.
  • A browser froze — read the wedge events and their fn @ url:char blocking-frame breadcrumb (source-map-resolvable for minified builds), plus profiler stacks where sampled.
  • Slow server round-tripsserver-request latency by endpoint, joined to the realm-server's own realm:requests / realm:search-timing stage breakdown via the logging correlation id.
  • Heavy deserialization, rebuild churn (grouped by the module that forced it), and realm index-event write-burst churn — framed as the causal upstream that explains why a rebuild fired or a linked card reloaded.

It documents the pipeline, the Loki label-vs-JSON-field split, the six event schemas, the working LogQL for each mode (lifted from the dashboard so they match the instrument), the local-dev bring-up, and the seam to indexing-diagnostics for the server-side half of a request.

Notes

  • Stacked on the telemetry instrument + dashboard change; this branch adds only the skill file. Retarget to main once the base merges.
  • The verified half — the mechanism, event glossary, dashboard, and query building blocks — is grounded in the local pipeline. The symptom interpretation is written as "how to investigate" with a calibrate-against-the-realm's-baseline caveat rather than fixed thresholds, so it stays honest as real field data accrues.

🤖 Generated with Claude Code

habdelra and others added 2 commits July 23, 2026 20:55
A mode-based diagnostic guide for the client performance telemetry: how to
turn a field complaint ("user XYZ said their card was slow to load", "my tab
froze") into a measured, user-attributed story from the boxel:client-perf Loki
stream and the Client Performance Grafana dashboard.

Leads with the user-attributed drill-down (pivot to a matrix_user_id, pin the
session, find the slow card-load, then spider into the sibling events that
explain it), documents each of the six event types and the LogQL that reads
them, frames realm-event as the causal upstream of rebuild/card-load churn,
and cross-references indexing-diagnostics for the server-side join via the
logging correlation id.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Corrects several descriptions to match the instrument exactly:

- `loading_ms`/`settle_ms` are both measured from the card-load window open
  and differ by one event-loop turn — neither is a first-paint metric; drop
  the "first content vs fully loaded" framing.
- `env` is a hidden per-deployment constant baked at apply time, not an
  operator-facing drill control; only `matrix_user_id`/`session_id` are.
- The wedge filter drops backgrounded-tab gaps outright and screens a
  foreground gap against an OS sleep/suspend wake by requiring a corroborating
  LoAF/longtask entry across a short grace window — not "timer coalescing".
- The instrument beacons six signal event types plus a keepalive.
- The By-user row surfaces signal-event volume, not a retry count.
- `retried` is a reauth retry past a transient 401, not exponential backoff.
- `profiler_stacks` is also absent where the self-profiler API/policy is
  unavailable, and `realm`/`env` are JSON fields too.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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