Skip to main content
This guide explains how to integrate ClickStack with the TrueFoundry AI Gateway to export OpenTelemetry traces.

What is ClickStack?

ClickStack is an open-source observability platform on ClickHouse for logs, metrics, and traces. Its HyperDX-based UI supports Lucene search, SQL queries, and distributed trace exploration for LLM and MCP workloads.

Key capabilities

Prerequisites

  1. TrueFoundry account: Register and complete the Gateway Quick Start Guide
  2. ClickStack or ClickHouse Cloud: Sign in to ClickStack or ClickHouse Cloud and note your ClickHouse endpoint, user, and password
  3. Hosted OTEL collector: A reachable ClickStack OTEL Collector deployment exposing the OTLP HTTP traces endpoint

Architecture overview

ClickStack requires a ClickStack OTEL Collector that receives OTLP from TrueFoundry, writes traces to ClickHouse, and serves them in the UI:

Integration steps

1

Get ClickHouse credentials

From ClickStack or ClickHouse Cloud, collect CLICKHOUSE_ENDPOINT (for example https://<clickhouse-endpoint>:8443), CLICKHOUSE_USER (commonly default), and CLICKHOUSE_PASSWORD for the collector.
2

Deploy the ClickStack OTEL Collector

Image: clickhouse/clickstack-otel-collector:latest
Expose port 4318 (or TLS at a reverse proxy) and use this Traces Endpoint in TrueFoundry:
Replace <domain> with your collector’s public hostname.
3

Test the collector endpoint

Confirm the endpoint is reachable:
4

Configure OTEL export in TrueFoundry

  1. In the TrueFoundry dashboard go to Settings → Organisation → AI Gateway → OTEL Config.
  2. Click the edit (pencil) control on the OTEL card.
  3. Enable Otel Traces Exporter Configuration.
  4. Select HTTP Configuration.
  5. Set Endpoint to https://<domain>/v1/traces.
  6. Set Encoding to Json.
The OTEL card summary shows your saved Config Type, Traces Endpoint, and Headers before you open the editor:
Settings Organisation AI Gateway OTEL Config summary card in TrueFoundry
5

Configure headers and save

In the exporter form, enable Headers and add:Click Save to apply the configuration.
TrueFoundry OTEL HTTP exporter form for ClickStack with JSON encoding and Content-Type header
6

Verify the integration

  1. Send requests through the TrueFoundry AI Gateway.
  2. In ClickStack, open Search → Traces, set a recent time range, and filter ServiceName = tfy-llm-gateway.
ClickStack Traces view showing tfy-llm-gateway spans from TrueFoundry AI Gateway

Configuration summary