What you will learn in this TP
- Configure the ClickHouse exporter
- Read the table schema
- Write SQL analyses
- Create a materialized view
- Tune TTL and measure compression
Introduction #
What you will learn in this section
- Configure the ClickHouse exporter
- Read the table schema
- Write SQL analyses
- Create a materialized view
- Tune TTL and measure compression
Context. Your data team wants to join telemetry with its own ClickHouse tables and long-term dashboards. You prove the value of SQL and control storage cost.
Prerequisites: a machine with Docker (4 GB free memory), curl and jq · Estimated time: 60 min
Telemetry in ClickHouse, reusable SQL queries, a RED materialized view and per-table retention.Setup #
Guided steps, with their solution.
1. Write the Compose file
Why? ClickHouse and a contrib collector are enough; ClickStack uses the same exporter.
Createdocker-compose.ymlandotelcol.yaml, then start.2. Generate data
Why? Two services, errors and logs give enough to analyze.
Send traces forpanierandpaiement, error traces and error logs.3. Read the schema
Why? The sort key tells which queries will be fast.
List the created tables, show theotel_tracesdefinition and findORDER BY,PARTITION BY,TTLand the indexes.4. Analyze in SQL
Why? These questions are hard or impossible to ask in a search UI.
Compute error rate and p95 latency per service, rebuild the slowest trace, then count error logs attached to error traces.5. Create a materialized view
Why? Long-term dashboards must not rescan every span.
Create ared_1mtable and its materialized view, send traces again, then read the aggregate.6. Retention and compression
Why? Retention is the first cost lever.
Set traces to 24 h, keep the aggregate 180 days, then measure each table's size and compression ratio.
Difficulty level : ●●●○○ (3/5)
My progress
Sign in to track your progress and take notes. Sign in
💬 Questions about this lesson
No questions yet: be the first to ask for help or share your configuration.
Recommended Articles
Telemetry in ClickHouse: schema, SQL, materialized views and retention
Telemetry in ClickHouse: otel_logs, otel_traces, otel_metrics_* and hyperdx_sessions tables, sort...
Observability on ClickHouse: why a columnar database changes the game
Why more and more observability platforms store logs, traces and metrics in ClickHouse: columnar ...
SigNoz, ClickStack and ClickHouse best practices for observability
Best practices for observability on ClickHouse with SigNoz or ClickStack: OpenTelemetry instrumen...
ClickStack: architecture, components and offerings (ClickHouse, HyperDX, OpenTelemetry)
ClickStack, ClickHouse's official observability stack: role of ClickHouse, the UI (HyperDX), the ...
Operating an observability platform on ClickHouse and choosing a tool
Operate ClickHouse for telemetry (replication, disks, merges, object storage, monitoring) and com...
The observability trilemma: cost, completeness and performance, and how solutions resolve it
Understanding the observability trilemma (cost, data completeness, query performance), its three ...
Sending telemetry to ClickStack: OpenTelemetry SDKs, collectors, logs, Kubernetes and browser sessions
Feeding ClickStack: ingestion key, OpenTelemetry SDK variables, forwarding through an existing co...
OpenTelemetry Collector, Grafana Alloy and Bindplane: comparing three approaches to telemetry pipelines
Detailed comparison of three ways to manage telemetry pipelines: the OpenTelemetry Collector in Y...
Using SigNoz: APM, traces, logs, dashboards and alerts
Use SigNoz day to day: APM view of services, traces and logs explorers, query builder, ClickHouse...