Repository navigation
fix(tracing): unify ClickHouse storage configuration - #43941
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
11e0233 to
5719ec7
Compare
There was a problem hiding this comment.
Devin Review found 3 potential issues.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
|
|
@greptile-apps wdyt |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…nv references Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
6316a23 to
12ff48f
Compare

TLDR
Problem this solves:
How it solves it:
tracing.store.type,url,database, andretention_dayslitellm/constants.py, readCLICKHOUSE_DATABASEandAGENT_TRACING_RETENTION_DAYSat startupos.environ/reference is unsetIntentional product change: a separate ClickHouse reader URL is no longer used,
AGENT_TRACING_SPEND_LOG_RETENTION_DAYSis gone, and the string formstore: clickhouseis rejected. None of these were in a releaseUser Flow
Before: an admin configures tracing with one ClickHouse URL, but trace reads are unavailable
general_settings.tracing.store: clickhouseandCLICKHOUSE_URL, then start the proxyGET http://localhost:4004/v1/traceswith an admin key and receive HTTP 501After: the same ClickHouse connection serves trace writes and reads
general_settings.tracing.store.type: clickhouse,store.url, andstore.retention_days: 14, then start the proxyGET http://localhost:4003/v1/traceswith an admin key and receive HTTP 200 with a trace pagePOST http://localhost:4003/v1/traceswith an OTLP JSON span and retrieve it by trace ID with HTTP 200Pre-Submission checklist
Screenshots / Proof of Fix
Both runs used the local ClickHouse and PostgreSQL Compose services, one
CLICKHOUSE_URL, and noCLICKHOUSE_READER_URLBefore (0f6a06a)
general_settings.tracing.store: clickhouse. Startup logsAgent tracing unavailable: 'CLICKHOUSE_READER_URL'curl -H "Authorization: Bearer $LITELLM_MASTER_KEY" http://127.0.0.1:4004/v1/traces. The response is HTTP 501 withAgent tracing is not enabledAfter (235d270)
tracing.store.type: clickhouse,tracing.store.url: os.environ/CLICKHOUSE_URL, andtracing.store.retention_days: 14. Startup completes without a tracing warningGET /v1/tracesrequest on port 4003. The response is HTTP 200 withdataandnext_cursorPOST /v1/traces, then requestGET /v1/traces/91913eaedfa5643a9a1acd15f512a6f8. Both responses are HTTP 200, and the detail containssingle-url-checksystem.tables.agent_traces_by_key,otel_traces, andspend_logseach showtoIntervalDay(14)Type
Bug Fix
Caveats
Severe
Low
Final Attestation
Link to Devin session: https://app.devin.ai/sessions/88f2936b688f4bdea7f713b41728a437
Open in Devin Desktop: https://app.devin.ai/desktop/session/88f2936b688f4bdea7f713b41728a437?variant=devin
Requested by: @yujonglee-berri