Repository navigation
Count kci-dev as its own analytics client #2144
Description
Activity
I’d suggest adding an explicit client label for dashboard vs kci-dev, while keeping os=unknown for CLI requests. Using os=kci-dev mixes application identity with the OS dimension and would make the Grafana OS panel misleading. device=cli looks appropriate.
Reacted by Alan PeixinhoI’d suggest adding an explicit client label for dashboard vs kci-dev, while keeping os=unknown for CLI requests. Using os=kci-dev mixes application identity with the OS dimension and would make the Grafana OS panel misleading. device=cli looks appropriate.
Noted.
Do you think it would make sense to also send OS information on kci-dev user-agent?
If you consider this as a good approach, I will be happy to open a PR on kci-dev.Yes, I think adding coarse OS information to the kci-dev User-Agent would be useful. The User-Agent is centralized in
kcidev/libs/common.py, so this should be a small change.I’d keep it limited to the OS family, for example
kci-dev/0.1.11 (Linux)or(macOS), without distro, kernel version, architecture, or other details. We should also normalize the OS names rather than exposing the rawplatform.system()value, since for example it reportsDarwinfor macOS.On the dashboard side, we should then parse that OS information while still classifying the client as
kci-devand the device ascli.Reacted by Alan PeixinhoIncluding an extra point here.
We should also keep version client for kci-dev, helping us track the update dynamics.- added a commit that references this issue
on Oct 1, 2026 PR to add OS in kci-dev user agent kernelci/kci-dev#318
wrote review, waiting for replay
- added a commit that references this issue
on Oct 7, 2026
Problem
kci-devsendsUser-Agent: kci-dev/<version>and nothing else.get_client_infodoes not recognize it, so those requests arebrowser=unknown,os=unknown, anddevice=desktop. They also incrementdashboard_unique_visitors_total, which has no client label, so CLI installs and dashboard users are one number.In the week of 21–28 Sep 2026, unknown was 65% of OS requests and 50% of browser requests. Much of that is this CLI.
Proposal
In
get_client_info, before the other guesses, match a User-Agent that starts withkci-devfollowed by/or the end of the string. Setbrowser=kci-dev,os=kci-dev,device=cli. Do not guess Linux: the User-Agent has no OS.Add a
clientlabel (dashboardorkci-dev) todashboard_unique_visitors_totalanddashboard_unique_visitors_by_endpoint_total.In
monitoring/dashboard.json, filter the unique-visitor stat toclient="dashboard"and add a CLI unique-visitor stat forclient="kci-dev". The browser, OS, and device panels already group by those labels, sokci-devandclishow up without new queries. No Prometheus scrape change. The metric labels are the Prometheus change.Tests
kci-dev/0.1.11→ browserkci-dev, oskci-dev, devicecli, unique visitor only onclient="kci-dev"client="dashboard"