Observability with Clickhouse
Configure your tracing data and store them in Clickhouse
The gateway supports OpenTelemetry tracing with ClickHouse as the storage backend. All traces are stored in the langdb.traces
table.
Setting up
Create the traces table in ClickHouse:
Enable tracing by providing the ClickHouse URL when running the server:
Or in config.yaml
:
Querying Traces
Traces are stored in the langdb.traces
table. Example query:
Leveraging LangDB APIs within ClickHouse
LangDB APIs can be called directly within ClickHouse. Check out our UDF documentation to learn how to use LLMs in SQL queries.
Running with Docker Compose
For a complete setup, including ClickHouse for analytics and tracing, follow these steps:
Start the services using Docker Compose:
This will start:
ClickHouse server on ports 8123 (HTTP)
All necessary configurations loaded from
docker/clickhouse/server/config.d
Build and run the gateway:
The gateway will now be running with full analytics and logging capabilities, storing data in ClickHouse.
Last updated
Was this helpful?