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

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

Описание и применение

Автор самовоспроизводил Langfuse для отслеживания нескольких профилей агентов, но плагин трассировки был включён только для одного профиля, а ClickHouse занимал 6 ГБ диска из‑за системных логов. После настройки ключей и тегов для всех профилей и отключения лишних таблиц ClickHouse размер диска сократился до 7,7 ГБ, а покрытие трассировки выросло до 100 %.

Задача

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

Результат

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

Рабочий процесс

  • 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

Доказательства

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

Источник

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

Источник

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.

Источник

  • Дата записи: 2026-10-27T17:26:43.536Z