Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Self-hosted Langfuse: tracing 7% of my AI agents, and ClickHouse logging itself

Description and use

The author self-hosted Langfuse to trace multiple agent profiles, but the tracing plugin was enabled only on one profile and ClickHouse consumed 6 GiB of disk for 2.2 MiB of trace data. After configuring keys and tags for all profiles and disabling unnecessary ClickHouse system logs, disk usage dropped to 7.7 GB and tracing coverage rose to 100 %.

Problem

Only 7% of AI agent calls were traced and ClickHouse consumed 6 GiB of disk for 2.2 MiB of trace data.

Outcome

Tracing coverage increased from 7% to 100% across profiles; ClickHouse disk usage dropped from 15 GB to 7.7 GB while preserving trace data.

Workflow

  • Copied Langfuse API keys into each profile’s env file
  • Enabled the Langfuse tracing plugin on each profile
  • Set the Langfuse environment to the profile name
  • Restarted the gateway and sent probe traces to verify tags
  • Created a ClickHouse config.d file to remove system log tables and lower logger level
  • Recreated the ClickHouse container and verified health and log suppression

Evidence

Tracing was enabled on exactly one of ten profiles: the default chat one, with 91 calls. That's roughly 7% of the traffic.

Source

ClickHouse was using **6.03 GiB** of disk. The actual Langfuse trace data in it was **2.2 MiB**.

Source

The third step is the one that matters for later. Traces carry no profile tag of their own, so without it every trace lands in one undifferentiated pile.

Source

  • Record date: 2026-10-27T17:26:43.536Z