Unify query patterns around bucketing session stats
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 3
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Currently session stats are written into the database via the agent or via the connecting clients reporting workspace usage. This data is partitioned by a `usage` flag on the table and subsequently the database queries use this flag to get the correct data depending on if the `workspace-activity` experiment is enabled or not.
Then this data is read from on different intervals and bucketed into different tables. The way we collect the data, count the unique number of sessions per timeframe, and filter certain data points out are all ad hoc and a little different depending on the query. Because this data is used by the workspace API, autostart and autostop, template insights, deployment stats, and prometheus metrics you often end up with slightly different numbers based on which feature you look at and what queries that feature is using.
Now that the spaghetti is starting to be fully understood and the code is being unified into less paths and branches, we should take the time to unify our query logic so it's easier for developers to understand in the future and make the data across the platform more consistent.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia tracciando le query session-stat esistenti utilizzate da workspace API, autostart e autostop, template insights, deployment stats e Prometheus metrics. Confronta il modo in cui ciascun consumer raccoglie i dati, conta le sessioni uniche, suddivide i periodi di tempo in bucket e filtra i punti; il lavoro è completato quando questi consumer utilizzano una logica di query unificata e producono risultati coerenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- prometheus
- Ambito
- analytics, backend, databases
- Tipo di issue
- Refactoring
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100