Materialized view support for Metric sources (gauges)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- clickhouse, typescript
- Ambito
- backend-api-design, databases, observability
Direzione di ricerca
Start with packages/api/src/models/source.ts, where materializedViews is currently defined for log and trace sources, then trace how gauge charts choose query tables and how log attributes map to __otel_materialized_* columns. The issue does not identify the routing or query files, so locate those entry points before estimating the full change. Done means gauge views can be registered and selected when metric name, aggregation, granularity, group-by, and filters fit, with other queries falling back to raw tables.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What are you trying to do?
Make dashboard metric charts over long ranges fast. Materialized views (#1507) work well for Log and Trace sources: on our deployment (@hyperdx/app 2.42.0), a per-minute log rollup answered 24 h count-by-service charts and the search histogram in 4–16 ms instead of 1.9 s, with exact counts.
Metric sources can't use them. materializedViews is defined only for the log and trace kinds (packages/api/src/models/source.ts), so every metric chart scans the raw otel_metrics_* tables. Metric charts are now the slowest part of our dashboards, at about 4.7 B metric rows per day.
What would you like to see?
Materialized view support for Metric sources, starting with gauges. These are the simple case, because no per-series state is involved:
- A Metric source can register views for its gauge table: target table, timestamp column, granularity, dimension columns, and aggregated columns (
avg/min/max/last_valueas-State/SimpleAggregateFunctioncolumns, like log MVs). - A gauge chart is routed to a view when the metric name, aggregation, granularity, and group-by / filter attributes fit. Otherwise it falls back, as today.
- Attribute dimensions: let a view expose
Attributes['k']/ResourceAttributes['k']as named columns, the way filters are already mapped to__otel_materialized_*columns for logs.
Counters (Sum) and histograms are cumulative and need per-series deltas, so they are filed separately (#3483).
Alternatives you've considered
- Raw-SQL tiles pointing at our own rollup tables. They work, but every panel has to be rewritten by hand and loses the builder (filters, group-by, alerts).
- Materialized columns for hot attribute keys. They help filters, but each series is still keyed on
cityHash64(ScopeAttributes, ResourceAttributes, Attributes), which reads the full Maps.
Anything else?
Happy to test a branch on our deployment: ClickStack with a self-hosted ClickHouse cluster.
- Lingua principale
- TypeScript
- Stelle
- 10.1k
- Fork
- 527
- Merge medio
- 1g 20h
- PR unite (30g)
- 186
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un 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 ClickHouse/ClickStack
-
external
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ClickHouse/ClickStack#3761 ·
I maintainer di solito rispondono entro 1 giorno
-
Metric chart with aggFn increase and a multi-column group-by fails: toString() gets several argumentsForse già presa @CG-5228 l’ha presa 26 giorni fa. Apertaexternal
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
ClickHouse/ClickStack#3477 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Slack notifications for inline alerts fail when the chart-explorer link passes Slack's 3000-character block limitForse già presa @Tyagiquamar l’ha presa 27 giorni fa. Apertaalerting bug external
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
ClickHouse/ClickStack#3452 ·
I maintainer di solito rispondono entro 1 giorno
-
check-alerts worker: 13 error spans (mongodb.create, NamespaceExists) every minute because mongoose autoCreate is still onForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertabug external Needs Feedback
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ClickHouse/ClickStack#3308 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
count_distinct aggFn on metric tiles ignores valueExpression, always counts distinct metric ValuesForse già presa @Harshul1484 l’ha presa 54 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ClickHouse/ClickStack#2311 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di ClickHouse/ClickStack
Issue simili
-
Add: GTrekkerApertacheck:passed streams:add
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
area: ui Bug Payload OSS
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
payloadcms/payload#19839 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
fix(auth): add the email OTP verification step to Pollar loginForse già presa @akansnoro l’ha presa oggi. ApertaStellar Wave
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
safetrustcr/dApp-SafeTrust#584 · 10 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
The manager preset saves launch definitions without the required file and digest pairForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno