feat(analytics): split kci-dev, scripts, and bots from dashboard traffic #2154
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 231 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.326
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2154"
general
weight: 0.35
bhcopeland
What it is
Classify User-Agents into client
dashboard,kci-dev,script, orbotRecord
kci-dev/<version>as the browser, and Linux, macOS, or Windows from(OS)in the User-AgentAdd a
clientlabel to request counts and daily unique visitorsAdd a Client control on the Grafana API dashboard and filter the analytics panels with it
New
clientseries start at deploy. Older samples without that label stay in Prometheus until they age out of the selected range.Closes #2144
How to test
From
backend/:1.
docker compose -f docker-compose.monitoring.yml up -d2. Start the backend with
PROMETHEUS_METRICS_ENABLED=trueand metrics on port 8001.runserverneeds--noreload.3. Send a few
/api/requests:4. On http://localhost:8001/metrics/ confirm
client="kci-dev",client="script",client="bot", andclient="dashboard". The kci-dev request series should showbrowser="kci-dev/0.1.11",os="Linux",device="cli".5. In Grafana at http://localhost:3000, import
monitoring/dashboard.json. Set the range to the last 15 minutes.6. Client: All clients shows one unique-visitor total and one slice per client on Requests by Client. Client: kci-dev limits the analytics panels to that client. Response time and total calls
stay unchanged, because those series have no
clientlabel.