Why teams store OpenTelemetry data in ClickHouse for SQL analytics
When telemetry volume outgrows the dashboards you started with, and your team needs SQL across traces, logs and metrics at the same time, ClickHouse is a self-hosted analytical store that the OpenTelemetry Collector can write to. OpenTelemetry itself is not an observability backend. It generates, processes and exports telemetry, and something else has to store and query it. ClickHouse fills that storage role, and you run it in infrastructure you control.
ClickHouse is open source under the Apache License 2.0, and ClickHouse's own integration documentation describes ClickStack, which provides default schemas for logs, traces and metrics. Those schemas give you a starting point, but they are not a finished design. Before you commit, confirm the exporter maturity for each signal you plan to send, the schema you will run, and how your team will query the data. The ClickHouse integration guide is the natural place to check the current default schemas against your plan.
ClickHouse fits better than a tool built for one signal when your questions cross signals, such as joining slow trace spans to error log lines and to a deployment table, or when you need ad hoc analytics over high-volume data that a dashboard product does not expose. It fits less well when your team mainly needs prebuilt views for one signal and has no SQL practice. In that case a single-signal backend may cost less to run. Ask your team which questions they will ask every week, and test those queries against a representative data set before you choose.
How telemetry flows from applications through the Collector into ClickHouse
The flow starts in applications instrumented with OpenTelemetry SDKs, which send traces, logs and metrics to Collector agents placed next to services. Agents hand data to a gateway Collector, where the ClickHouse exporter writes it into replicated tables. The trust boundary sits between the application network and the data network, so the Collector endpoints and exporter credentials on that line deserve the first review. Query clients read from ClickHouse replicas, which stay in sync through ClickHouse Keeper nodes.
Telemetry path from instrumented applications through the Collector into replicated ClickHouse tables.
Which signals the ClickHouse exporter handles well today
Trace support is the most settled part of the pipeline on the application side. The OpenTelemetry status page lists trace SDKs as stable in most languages, including C++, .NET, Go, Java, JavaScript, PHP, Python, Ruby and Swift. The open question is the exporter itself: whether its traces pipeline is at a stability level you accept, and whether its table layout matches your span data. ClickHouse documents default trace schemas through ClickStack, which gives you a baseline to compare against.
- Application side: Confirm that each service language in your estate is on the stable list, and note any service that relies on a different trace path.
- Exporter component: Check the traces stability level in the ClickHouse exporter README within the contrib distribution you deploy, because core Collector components carry mixed levels.
- Schema fit: Compare span attributes, resource attributes and span events with the default trace schema before you adopt or change column definitions.
- Sampling location: Decide whether sampling happens in the SDK, the Collector or both, since that directly changes row counts.
Before go-live, load production-shaped trace data into a pre-production cluster and confirm the span-to-row mapping with your own query patterns.
Log maturity varies more than trace maturity. The status page shows log SDK support differs by language, with several languages still in development. Many teams therefore collect logs through Collector receivers, such as OTLP from applications or file and host receivers from hosts, instead of relying on in-process log SDKs. Your ingest path determines which stability questions matter, so map each log source to its path before you design the table.
- SDK coverage: Check whether each application language has a stable log SDK, and plan a Collector-side path for languages that do not.
- Receiver stability: Confirm the stability level of each log receiver in its README, since receivers and exporters are documented separately.
- Attribute mapping: Check how log body, severity, timestamps and attributes land in columns, especially for nested or large payloads.
- Retention settings: Confirm partitioning and time-to-live settings against the ClickHouse replication and backup guidance before the first ingest.
- Redaction order: Apply the redaction processor before export, as the OpenTelemetry security best practices recommend, so sensitive attributes never reach the database.
Ask for each log source's maturity in writing, and test with production-shaped log volume and field sets before you freeze the schema.
Metrics carry the most schema risk. OTLP metric types, including sums, gauges and histograms, do not all land in the same table shape, and temporality affects how values are stored and queried. Confirm the exporter's support for each metric type in its README before you assume every dashboard query will work unchanged. ClickStack documents default metric schemas, which you can use as a reference point for column and table design.
- Metric types: List the metric types your applications and hosts emit, and confirm how the exporter writes each one.
- Temporality: Confirm how cumulative and delta temporality are handled, because this changes how you compute rates in queries.
- Cardinality: Each unique attribute combination creates a series, so review attribute sets early, since high cardinality grows both storage and query cost.
- Alerting fit: Decide whether alerts run against ClickHouse or a time-series store, because live alerting and long-range analytics have different needs.
Ask the exporter maintainers or your Collector build provider which metric types and temporality modes are supported in the version you deploy, and get the answer in writing.
Schema and deployment options and when each fits
This table compares the three decisions that shape a ClickHouse store for Collector data: schema approach, single node versus replicated tables, and self-hosted versus managed service. Read each row as a trade-off between control, data residency and the operating effort your team keeps. The main takeaway is that ClickStack default schemas speed up a first working pipeline, while replication and self-hosting add control and operating work that someone must own.
| Decision | Option | Trade-off | When it fits |
|---|---|---|---|
| Schema | ClickStack default schemas | Fastest path to working logs, traces and metrics tables; less room to tune column types and ordering for your own queries | Teams starting out who want to validate the data flow before modeling their own queries |
| Schema | Custom table design | Full control over column types, sort keys, partitioning and TTL; you own the migrations and the exporter mapping | Teams with known query patterns, specific retention rules or sensitive fields that need explicit handling |
| Topology | Single node | Lowest moving parts and no Keeper quorum; a node failure means downtime and recovery from backups | Non-critical analytics, development environments or pilots with data you can rebuild |
| Topology | Replicated ReplicatedMergeTree tables with ClickHouse Keeper | Replicas resync automatically after recovery, but replication does not protect against human error or corruption; Keeper nodes add hosts to run | Production telemetry where downtime matters; confirm Keeper host sizing and backup plans before go-live |
| Hosting | Self-hosted ClickHouse in your infrastructure | You control data location, network paths, upgrades and backups; your team carries patching, capacity and on-call work | Regulated data that must stay in your data centers or cloud accounts, or teams with existing database operations skills |
| Hosting | ClickHouse Cloud managed service | The vendor operates the service, reducing day-to-day effort; you must confirm region, data residency terms and where logs and metadata are processed | Teams that want managed operations and can accept the provider's hosting location and contractual terms after review |
How to set up the ClickHouse exporter step by step
This sequence takes a team from choosing a supported ClickHouse release to confirming that traces, logs and metrics from the Collector land in the right tables with batching and retries in place.
Choose a supported ClickHouse release line
Your platform engineers pick the ClickHouse release line before any installation. Check the security policy for the versions that currently receive security updates, then choose between the latest stable line, which the production FAQ recommends for most production use, and an LTS line, which ships twice a year and is supported for a year after release. Confirm the exact version against the GitHub releases page and read the changelog for backward-incompatible changes. Done when the chosen version is written into your change record and the same version is planned for the pre-production environment.
Prepare Keeper nodes and replica hosts
Your infrastructure team provisions the hosts that will run ClickHouse replicas and ClickHouse Keeper. The replication guide recommends at least three Keeper nodes, on dedicated hosts in production, with about 4 GB of RAM each. Place replicas and Keeper nodes so that a single host or rack failure does not remove quorum, and confirm the network paths between them. Done when every Keeper node reports healthy and each replica can reach the others on the required ports.
Create replicated tables from the chosen schema
Your ClickHouse administrator creates the database and tables using the default schemas that ClickStack and the ClickHouse OpenTelemetry integration document for logs, traces and metrics. Use ReplicatedMergeTree tables so that Keeper coordinates replication, and set partitioning and retention to match the volume you expect. Review each table definition with the data owners before the first write. Done when a
SHOW CREATE TABLEcheck on each replica shows identical definitions and the tables appear on every replica.Configure user access and external authentication
Your identity team creates a dedicated ClickHouse user for the Collector with insert rights limited to the telemetry tables, and no rights to administrative or unrelated databases. Where your directory is LDAP, Kerberos, X.509 or JWT based, configure the matching external authenticator instead of local passwords where your policy requires it. Store the credential in your secrets system and not in the Collector configuration file. Done when a test login with the Collector user can insert into the telemetry tables and is refused on other tables.
Configure the exporter with batching and retries
Your platform engineer adds the ClickHouse exporter to the Collector pipeline for each signal, with batching enabled so the Collector sends fewer, larger inserts, and with retry settings so transient failures do not drop data silently. Set the endpoint, database and credentials through environment variables or secret references. Confirm the exact configuration keys and defaults against the exporter README for your Collector version before you rely on them. Done when the Collector starts without configuration errors and its own logs show the exporter initialized for each pipeline.
Send test telemetry from a known source
Your application or test team sends a small, known set of traces, logs and metrics through the Collector. Use a test service with recognizable names and a unique marker value in an attribute so the rows are easy to find. Keep the test data free of real customer or regulated content. Done when the Collector reports the batches as accepted and no export errors appear in its telemetry for the test window.
Verify rows arrive for each signal
Your administrator queries each telemetry table for the marker value and compares row counts with the number of records the test source sent. Check timestamps, resource attributes and severity or span fields for each signal, and confirm that a replica other than the writer returns the same rows. Record any gaps and trace them to the Collector logs or the ClickHouse query log before going further. Done when every signal shows matching counts and fields on both replicas, and that result is saved as the baseline for your restore and retention tests.
Batching, partitioning and retention for telemetry volume
The main decision in this section is how often the Collector sends data to ClickHouse, because that choice sets the size and number of inserts ClickHouse must absorb. Every insert into a MergeTree-family table creates a new data part, and background merges have to combine those parts over time. When the Collector's batch processor sends many small batches, ClickHouse accumulates parts faster than it can merge them, which raises CPU use, slows queries and can push the server toward the "too many parts" condition. The fix is to batch on the Collector side so each insert carries a substantial number of rows. Confirm the batch settings your exporter version exposes, then test them against your own event rate rather than copying values from a blog post. Retries matter here too: a failed insert that the exporter resends should not multiply the number of small parts.
Partitioning and retention determine how storage cost grows after the data arrives. Telemetry tables are usually partitioned by time so that old data can be dropped as a whole partition or expired by TTL rules, which avoids expensive row-level deletes. The partition key should match your retention policy and your most common query window, because a key that is too fine creates many small partitions and a key that is too coarse makes expiry slow to reclaim space. Retention drives cost through compressed storage, replicas and backups, and each of those multiplies the raw volume. Ask your team which signals need long retention and which only need days of data, since traces, logs and metrics often have different answers. Review the table definitions bundled with the OpenTelemetry-to-ClickHouse integration before you change them, because the exporter may expect specific column layouts.
Before you choose batch sizes, partition keys or TTL periods, measure the current state of your environment. Record the ingest rate per signal, the average and peak rows per insert the Collector sends, the number of active parts per table, and the time merges take to catch up during peak load. Run representative queries against a copy of the data and note how the partition key affects their scan range. Then test the chosen values in a pre-production cluster with realistic volume, because the production FAQ recommends that kind of environment before upgrades and configuration changes. Keep the backup and restore plan in view as well: retention settings do not replace the ClickHouse backup documentation, which recommends regular restore tests on spare clusters.
Securing the ClickHouse path: authentication, TLS and Collector configuration
Telemetry reaches ClickHouse through several hops, and each one needs its own identity, encryption and access decision. The cards below cover how users and Collectors authenticate to ClickHouse, how Collector credentials are managed, what sensitive data must be removed before storage, and how the Collector configuration itself is protected.
External authenticators for ClickHouse users
ClickHouse can delegate sign-in to external authenticators, including LDAP directories, Kerberos, SSL X.509 certificates, an HTTP authenticator and JWT. Pick the method that matches your identity system, then confirm which of these fits the accounts that write telemetry and the accounts that query it. Test each path with a non-production user before enabling it for the whole organization.
External authenticators docsAccess control for writers and readers
Separate the account the Collector uses to insert telemetry from the accounts analysts use to query it. The writer needs insert rights on the telemetry tables only, while readers need select rights, and neither should hold administrative privileges. Review roles and grants with your security team, since broad default access is a common gap in analytics stores.
Access control docsTLS on every hop
Encrypt the connection from the Collector exporter to ClickHouse and from clients to the query endpoints. Decide where certificates are issued and rotated, and confirm that the exporter is configured to verify the server certificate rather than skipping verification. Ask your team how certificate expiry will be detected before it causes an outage.
Outgoing credentials with authenticator extensions
The Collector can add credentials to outgoing exporter requests through authenticator extensions, such as the oauth2client extension, and can authenticate incoming connections on receivers, for example with OIDC. Use these instead of static passwords in the configuration where your ClickHouse setup supports the matching method. Confirm the token lifetime and how the Collector refreshes it.
Collector configuration docsRedacting sensitive attributes before storage
Log bodies, span attributes and resource attributes often carry tokens, email addresses or patient and account identifiers that should never reach a long-lived analytics table. Apply the redaction processor in the Collector so values are removed before the ClickHouse exporter writes them. Run a sample of real telemetry through the pipeline and inspect the stored rows to confirm the rules work.
Storing Collector configuration securely
The Collector configuration holds endpoints, usernames and references to secrets, so treat it as sensitive. Keep it in version control without inline credentials, inject secrets at runtime, and restrict who can read or change the files. Build the Collector with only the components the pipeline needs, following the Collector Builder approach in OpenTelemetry's security guidance, and bind server components to localhost unless a network exposure is intended.
Config best practicesKeeping ClickHouse current and proving backups restore
Start by deciding which release line each cluster runs. ClickHouse ships stable releases roughly monthly, and the three latest stable releases receive diagnostics and bug fix backports. LTS releases ship twice a year and are supported for a year after release. For a telemetry store that other teams query every day, the production FAQ recommends stable releases for most workloads, with a pre-production environment loaded with representative data and queries. Before any upgrade, check the ClickHouse production FAQ guidance and read the changelog, because minor backward-incompatible changes can occur. Then check the ClickHouse security policy for the versions that currently receive security updates. Any cluster running a version outside that list should be scheduled for upgrade, and the exact supported list should be confirmed on the day you plan the change, since it moves with each release.
Test the upgrade against the signal tables your Collector writes, not against an empty cluster. Replay a representative week of traces, logs and metrics, then run the dashboards, alert queries and ad hoc searches your engineers actually use, and compare results and query timings before and after. Confirm that the OpenTelemetry exporter's table definitions and any schema changes from the ClickHouse documentation on OpenTelemetry still match what the Collector sends. Also record who approves the upgrade, how long the change window is, and how you will roll back if a query regresses.
Replication does not replace backups. ReplicatedMergeTree tables, coordinated by ClickHouse Keeper, keep replicas in sync and resync a recovered replica automatically, but a bad DROP or a corrupted part is copied to every replica. Use BACKUP and RESTORE to keep full and incremental copies on local disk, S3-compatible storage or Azure Blob Storage, and retain them outside the failure domain of the cluster. The ClickHouse backup documentation warns that a backup never test-restored will probably not restore when needed. Schedule restore tests on a spare cluster at a set interval, restore a recent partition and a full database, run row counts and sample queries against known values, and record the elapsed time and any errors. Ask your team to confirm the restore time objective the business expects, and treat a failed restore test as an incident.
Limits to confirm before you commit to ClickHouse for telemetry
ClickHouse is a strong analytical store, but telemetry adds moving parts that the database documentation does not settle for you. The cards below cover the exporter, schema drift, query load, coordination hosts and hosting location, which together decide whether the design holds at your volume.
Exporter maturity per signal
Check the ClickHouse exporter's stability and feature coverage separately for traces, logs and metrics before you assume all three work the same way. Maturity is documented per component in the Collector's README and on the OpenTelemetry status page, and it can differ by signal. Ask for the component version you will run and test each signal against your own data before committing.
- Latest Collector release
- v0.163.0
Schema changes across versions
Table layouts and column names can change when the Collector or ClickHouse moves to a new version, which breaks dashboards and SQL that depend on them. Read the changelog for both sides before each upgrade and decide whether you will pin versions or migrate tables. Keep one saved query set that you run after every change to catch silent column drift.
Query performance at your volume
Benchmark with your real event rate, cardinality and query patterns rather than sample data. Measure ingest lag, merge pressure and the latency of your most common dashboard queries over a realistic retention window. ClickHouse's production guidance recommends a pre-production environment with representative data and queries, so plan that test as a gate before go-live.
Keeper sizing on dedicated hosts
Replicated tables depend on ClickHouse Keeper, which the replication guide recommends running as at least three nodes on dedicated hosts in production, with about 4 GB of RAM each. Confirm that your platform team can provide separate hosts and that Keeper will not compete with ClickHouse for memory or disk. Include Keeper in your monitoring and failure tests, not only the data nodes.
- Minimum Keeper nodes
- 3 nodes
Data residency for managed service
ClickHouse Cloud is a managed option sold by ClickHouse Inc., while the server itself is open source under Apache-2.0. If telemetry carries regulated or personal data, confirm which regions and providers the managed service would use and whether that fits your residency rules. Self-hosting inside your own accounts keeps the data location under your control, and that choice belongs in the design, not after it.
Questions buyers ask before storing telemetry in ClickHouse
What drives the cost of storing OpenTelemetry data in ClickHouse?
The main cost drivers are schema design, the number of replicas and Keeper nodes, storage volume, backup testing and the upgrade cadence. Schema work is one-time but shapes every later query, so it deserves the most attention early. Replicas, Keeper nodes and storage recur every month, and their size grows with telemetry volume and retention. ClickHouse's replication guide recommends at least three Keeper nodes on dedicated hosts in production, with about 4 GB of RAM each, which the source gives as a starting point rather than a sizing answer. Ask any partner for a written scope that separates one-time build work from recurring operations, and for the environment assumptions behind each host count.
How long does a self-hosted ClickHouse telemetry build take?
Duration depends on how many signals you store, how many sources feed the Collector, how many query use cases must be supported and how much of your infrastructure must be prepared first. Logs, traces and metrics each need their own table design and batching settings, and a pre-production environment with representative data and queries is recommended before go-live. No fixed timeline applies across environments, so ask for a schedule in the written scope that lists the signals, environments and acceptance tests included. Timelines should follow from that scope rather than from a template.
What does the client need to provide for this engagement?
Three things shorten the work most: access to the target environment, named telemetry owners and a list of query use cases. Environment access covers the cloud accounts, data centers or air-gapped networks where ClickHouse and the Collector will run. Telemetry owners decide which fields, retention periods and sensitive attributes are acceptable. Query use cases, such as error rate by service or log search for a security team, determine how tables are ordered and partitioned. Confirm these inputs before the scope is signed, because missing answers usually cause rework in schema design.
Can our own team run ClickHouse for telemetry without a partner?
Yes, a team with Linux, Kubernetes or VM operations skills and database experience can run it, but it needs to own several recurring tasks. Those include monitoring replicas and Keeper, applying supported releases, reading changelogs before upgrades and running restore tests. ClickHouse's backup documentation warns that a backup never test-restored will probably not restore properly when needed, so restore drills must be scheduled and staffed. Check whether your team can cover those duties on a regular cycle before deciding between internal operation and a partner retainer.
How do ClickHouse upgrades affect a telemetry platform?
Upgrades are a recurring task, so the plan should be set before the first production deployment. ClickHouse says stable releases ship roughly monthly, the three latest stable releases receive diagnostics and bug fix backports, and LTS releases ship twice a year with one year of support. The production FAQ recommends testing in a pre-production environment with representative data and queries and reading the changelog, because minor backward-incompatible changes can occur. Choose between the stable and LTS lines based on how often your team can test and apply upgrades, and confirm the supported versions on the ClickHouse security policy before each cycle.
Is self-hosted ClickHouse different from ClickHouse Cloud for telemetry?
Yes. The ClickHouse server is open source under the Apache License 2.0, and ClickHouse Inc. separately sells ClickHouse Cloud as a managed service. Self-hosting places the server, replicas, Keeper nodes, backups and upgrades in infrastructure you control, which matters when telemetry must stay inside a controlled network. Your team then carries capacity planning, patching, backup storage and restore testing that a managed service would otherwise handle. Compare the two on data residency, operating staff and recurring cost, and ask any partner to state which of these duties sit in its scope.
What security and access controls should we plan for telemetry storage?
Plan authentication, network isolation and audit of access from the start, because telemetry often contains sensitive attributes. ClickHouse supports LDAP authentication and directories, Kerberos, SSL X.509 certificates, an HTTP authenticator and JWT authentication as external authenticators, and access control is managed through its access rights documentation. Pair these with redaction in the Collector so sensitive fields are removed before storage, not after. Confirm which authenticator your identity provider supports and who may run queries against raw logs before the table design is fixed.
How DeployOpen scopes, delivers and supports ClickHouse telemetry storage
DeployOpen plans, builds and documents ClickHouse as telemetry storage for OpenTelemetry data in infrastructure you control. Each engagement starts with a written scope covering signals, schemas, batching, retention and backups, so your security, platform and compliance teams can review the design before anything is deployed.
How we scope
- Written scope names which signals (traces, logs, metrics) go to ClickHouse and which stay in other back ends.
- We agree the table schemas, such as ClickStack defaults or custom tables, before the Collector exporter is configured.
- Scope records the ClickHouse version line, whether you need an LTS or stable release, and the upgrade policy.
How we build
- We configure Collector exporter batching, retry and queue settings, then test them against representative event volumes.
- Retention rules and TTL settings are built per table and checked against your data protection requirements.
- Replication with ClickHouse Keeper, external authentication and TLS are configured and verified in a pre-production environment.
How we hand over
- You receive configuration, schema definitions, runbooks and a record of tests run against the pre-production environment.
- Backup and BACKUP/RESTORE jobs are delivered with a documented restore test on a spare cluster, not just a configured schedule.
- Knowledge transfer covers Collector pipeline changes, schema migrations and the steps for reading the changelog before each upgrade.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer after handover.
- Upgrade work follows the ClickHouse changelog and is tested in pre-production before production rollout.
- Periodic restore tests and review of ingestion health, disk growth and Collector drop rates can be included in the retainer.

