litellm/litellm-rust/crates/traces/AGENTS.md
yujonglee be67fce26a
refactor(proxy): inject tracing receiver and access context (#44035)
* refactor(proxy): inject tracing receiver and access context

* refactor(proxy): own tracing resources through FastAPI lifespan

* test(proxy): pass tracing dependency in Lens lifecycle

* refactor(proxy): stop tracing logger cooperatively

* refactor(proxy): derive tracing permissions in one place

* refactor(proxy): compose application lifespan state

* refactor(proxy): give Lens tracing storage directly

* refactor(tracing): name shared ClickHouse storage explicitly

* refactor(tracing): extract shared ClickHouse storage crate

* test(proxy): isolate db push timeout from Lens safety check

* fix(tracing): drain spend retries during shutdown
2026-10-01 13:45:32 -07:00

748 B

  • Keep OTLP decoding, trace schema, row encoding and named query selection here. Generic ClickHouse connections and HTTP execution belong in litellm-storage-clickhouse
  • Keep this crate independent of Python; PyO3 conversion and public Python exceptions belong in python-bridge
  • Keep the SQL migrations here as the only ClickHouse schema definition
  • Use typed query parameters and a dedicated SELECT-only reader with server-side limits
  • Keep config/reader.xml grants on the database the schema is created in (CLICKHOUSE_DATABASE, default litellm)
  • Bound insert time and encoded bytes; make retry deduplication behavior explicit for supported ClickHouse versions
  • Test storage behavior through the crate's public API against ClickHouse