[FEATURE] `--output otel` phase 2 and 3: OTLP/HTTP push exporter and backend recipes
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
- go
- Ambito
- backend-api-design, documentation, observability
Direzione di ricerca
Inizia leggendo il design della fase 1 in #738 e l’implementazione esistente di Output Modes documentata in questa issue. Traccia quindi la generazione attuale dei record OTLP/JSON e pianifica l’exporter in base alle variabili d’ambiente elencate, al batching per statement, ai retry e allo scenario del robot OTLP simulato. Il lavoro è completato quando entrambe le fasi dell’exporter sono coperte, la documentazione di global-flags e Output Modes è aggiornata e sono documentate le ricette per ClickHouse, Datadog e CI pianificata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Follow-up to #738, which shipped phase 1 (--output otel as a general output format, one OTLP/JSON LogsData per row plus a completion record per statement) in #754 and is documented under Output Modes. This issue carries the two remaining phases from that design.
Phase 2: OTLP/HTTP push exporter
Push the records straight to an OTLP-capable backend instead of (or as well as) writing the file, driven by the standard environment variables so no new flags are needed:
OTEL_EXPORTER_OTLP_LOGS_ENDPOINT(falling back toOTEL_EXPORTER_OTLP_ENDPOINT+/v1/logs)OTEL_EXPORTER_OTLP_HEADERS(for example a Datadog API key or ClickStack ingestion token)
The LogsData emitted today is byte for byte the body of POST /v1/logs, so this is an HTTP client plus batching per statement (chunked for large result sets), no new dependency. Targets ClickStack's OTLP intake and Datadog's OTLP endpoint directly, and any OpenTelemetry Collector otlp receiver.
- Exporter behind the env vars above; batch per statement, chunked for large results; retry with backoff on 429 / 5xx
- Robot scenario against a mocked OTLP endpoint asserting the request body, headers and batching
-
global-flags/ Output Modes docs updated
Phase 3: backend recipes
A docs page with the joint use cases end to end:
- ClickHouse: materialized view from
otel_logsinto a typed inventory table keyed by(snapshot_id, identity); latest state per resource (argMaxby timestamp); drift between two snapshots (join on identity, fingerprint inequality, anti-joins for appeared and disappeared); entitlement history (principal, role, first seen, last seen) - Datadog: resource attribute mapping and the equivalent log queries
- A scheduled CI example (
TRACEPARENT,OTEL_RESOURCE_ATTRIBUTESstampingdeployment.environmentand a job name)
Design already settled in #738
Per-row grain; statement start time as the snapshot instant on every record; stackql.snapshot.id, stackql.query.hash and stackql.row.fingerprint as the correlation keys; no identity heuristics (the backend chooses the key); nested columns as JSON strings in attributes with the full document in the body. The attribute schema is pinned at scope github.com/stackql/stackql/internal/stackql/output version 1.0.0.
- Lingua principale
- Go
- Stelle
- 991
- Fork
- 86
- Merge medio
- 1g 20h
- PR unite (30g)
- 35
Guida per i contributori
Apri 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 stackql/stackql
-
enhancement
-
enhancement
-
enhancement
-
[FEATURE] support GraphQL-backed INSERT/UPDATE/DELETE/EXEC via any-sdk GraphQL mutation support Apertaenhancement
Tutte le issue di stackql/stackql
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
modelcontextprotocol/registry#1654 ·
-
Type/Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenNSW/nsw-srilanka#497 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
milvus-io/birdwatcher#545 ·