Skip to content

feat(telemetry): clickhouse read backend - #92

Merged
ivanrdvc merged 6 commits into
mainfrom
feat/telemetry-backend
Jul 4, 2026
Merged

feat(telemetry): clickhouse read backend#92
ivanrdvc merged 6 commits into
mainfrom
feat/telemetry-backend

Conversation

@ivanrdvc

@ivanrdvc ivanrdvc commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replaces the OpenObserve/App Insights read providers with a ClickHouse backend that pushes list filtering, sorting, and pagination down into SQL instead of scanning-then-filtering in JS.
  • Serves traces, spans, sessions, tools, and task rollups from the new provider behind the existing normalized-Span boundary, so downstream consumers are unchanged.

ivanrdvc added 6 commits July 2, 2026 22:32
Add ClickHouse as a telemetry backend read via @clickhouse/client,
normalizing rows to the shared Span type like the other providers.

- infra: docker-compose (clickhouse-server + otelcol-contrib), collector
  config, and init schema owned by loupe (create_schema=false): wide
  otel_traces with promoted MATERIALIZED columns, a time-ordered projection
  and FirstInputPreview for body-free list scans, the trace_summary MV for
  getTrace windows, and the trace_list parameterized view.
- trace_list centralizes per-trace domain rules once; identity/root columns
  use argMinIf(x, Timestamp, cond) rather than max(String). Validated against
  843k live spans: 0 diffs vs the prior maxIf query, 103ms full-range page.
- provider: getTrace/getSession/listTraces/listSessions/listSpans/listLogs
  plus tool/agent analytics; values bound as params (chString escapes the few
  inlines, backslash-safe unlike DataFusion's sqlString).
@ivanrdvc
ivanrdvc merged commit 2658a7a into main Jul 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant