Visible time on a dashboard route
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, python, redis
- Ambito
- backend, frontend, observability
Direzione di ricerca
Start by locating the dashboard route handling, generated route list, beacon handler, Redis visit storage, histogram definitions, and UTC-day cron job. Run the existing dashboard metrics tests, then add the listed visible-time, route-change, pagehide, hidden-tab, expiry, and metric-isolation cases. Done means each visit contributes at most one sample with the required route label and bounds.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
Visible time is how long a route stayed in the foreground. The dashboard is a single-page app, so leaving a screen is a route change, and a tab in the background is still open. A visit that never sends its ending is infinite.
Proposal
Record visible time in the dashboard UI. Start a timer when a route opens. Pause it while document.visibilityState is hidden.
Send two beacons with navigator.sendBeacon. Each one carries a visit id and the route id. The route id keeps its parameters (/tree/$treeName/$branch, /hardware/$hardwareId). The handler accepts only route ids from the generated route list. The visit id is the Redis key. The histogram label is route.
- The open beacon stores the visit in Redis.
- The beacon on route change or
pagehideobservesdashboard_route_visible_secondswith the elapsed visible seconds, clamped at 86400, and deletes the key.
Buckets are 5, 15, 30, 60, 120, 300, 600, 1800, 86400, and +Inf. The board shows p50 and p95 per route. A finished visit stays at or under 86400, so the +Inf bucket is the visit that never ended.
At the end of the UTC day, a cron observes +Inf for every visit key still open and deletes it. The histogram is written once per visit. The handler records dashboard_route_visible_seconds only, and these beacons stay off dashboard_backend_requests_by_client_total, the latency histogram, and the unique-visitor count.
Tests
- A visible stay of 20s on
/tree/$treeName/$branch, then a route change, observes 20 ondashboard_route_visible_secondsfor that route, and the Redis key is gone. - 30s with the tab hidden is not part of that sample.
- A route left open through the end of the UTC day observes +Inf for that route.
- A beacon for that visit after the cron does not add a second sample.
- The beacon request does not increment
dashboard_backend_requests_by_client_total.
- Lingua principale
- Python
- Stelle
- 9
- Fork
- 31
- Merge medio
- 5g 22h
- PR unite (30g)
- 19
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di kernelci/dashboard
-
4xx and 5xx by endpointForse già presa @alanpeixinho l’ha presa 4 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni
-
[Local dev environment] PRIVACY.md missing in dashboard containerForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 2 giorni
-
[AB Comparison] Add labels to Previous commit and Branch head buttonsForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni
-
Requests per visitorForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 58/100
kernelci/dashboard#2151 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di kernelci/dashboard
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 3 giorni
-
Negation with "not" and "no" is ignored during sentiment analysisForse già presa @vivek-3728 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
techcsispit/mess-mood#11 · 1 commento ·
-
changelog investigate
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
ramnes/notion-sdk-py#408 ·
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
btclib-org/btclib-wallet#267 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
knnmelprop/YAADO#111 ·