Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Visible time on a dashboard route

Aperta
#2,153 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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

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 pagehide observes dashboard_route_visible_seconds with 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 on dashboard_route_visible_seconds for 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

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di kernelci/dashboard

Tutte le issue di kernelci/dashboard

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.