Fixedstring type for SpanId and ParentId traces for better compression

Aperta
#3,454 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
49/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
clickhouse, typescript

Direzione di ricerca

Start by locating where HyperDX defines or provisions its recommended ClickHouse otel_traces table, then read the relevant schema and trace ingestion code to see how TraceId, SpanId, and ParentSpanId are stored. Check the ClickHouse FixedString length requirements against the trace ID formats and existing data. Done means the issue's proposed migration has a confirmed scope and behavior; the issue does not specify which fields to change or how existing tables should migrate.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement external Needs Feedback

What are you trying to do?

In the current recommended Clickhouse table structure for Traces SpanId and TraceId have type String

CREATE TABLE IF NOT EXISTS ${DATABASE}.otel_traces
(
    `Timestamp` DateTime64(9) CODEC(Delta(8), ZSTD(1)),
    `TraceId` String CODEC(ZSTD(1)),
    `SpanId` String CODEC(ZSTD(1)),
    `ParentSpanId` String CODEC(ZSTD(1)),
    `TraceState` String CODEC(ZSTD(1)),

These two fields are compressing very badly and basically make up half of the table space usage on disk by themselves:

2. │ SpanId             │ 34.68 GiB       │ 100.74 GiB        │     2.9 │        17.55 │

What would you like to see?

Would it make sense to migrate them to FixedString type?

Lingua principale
TypeScript
Stelle
10.1k
Fork
527
Merge medio
1g 20h
PR unite (30g)
186

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 ClickHouse/ClickStack

Tutte le issue di ClickHouse/ClickStack

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.