Repository navigation
feat(tracing): correlate spend logs with agent traces #43865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a3455fd
473faec
7b04935
b7ab950
2f0bcc7
b88ab3e
3e74da0
338702e
1fd9e84
f099316
914450a
0841d91
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| name: litellm-tracing | ||
|
|
||
| services: | ||
| litellm: | ||
| build: | ||
| context: .. | ||
| target: runtime | ||
| command: ["--config", "/app/tracing-config.yaml", "--port", "4000"] | ||
| environment: | ||
| LITELLM_MASTER_KEY: test | ||
| LITELLM_SALT_KEY: sk-local-tracing-salt-key | ||
| DATABASE_URL: postgresql://litellm:litellm@db:5432/litellm | ||
| STORE_MODEL_IN_DB: "True" | ||
| CLICKHOUSE_URL: http://default:local-tracing-write@clickhouse:8123 | ||
| CLICKHOUSE_DATABASE: default | ||
| OPENAI_API_KEY: ${OPENAI_API_KEY:-} | ||
| volumes: | ||
| - ./tracing-config.yaml:/app/tracing-config.yaml:ro | ||
| ports: | ||
| - "127.0.0.1:4002:4000" | ||
| depends_on: | ||
| db: | ||
| condition: service_healthy | ||
| clickhouse: | ||
| condition: service_healthy | ||
| healthcheck: | ||
| test: | ||
| - CMD-SHELL | ||
| - python3 -c "import urllib.request; urllib.request.urlopen('http://localhost:4000/health/liveliness')" | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 12 | ||
| start_period: 30s | ||
|
|
||
| db: | ||
| image: postgres:16 | ||
| environment: | ||
| POSTGRES_DB: litellm | ||
| POSTGRES_USER: litellm | ||
| POSTGRES_PASSWORD: litellm | ||
| volumes: | ||
| - postgres_data:/var/lib/postgresql/data | ||
| ports: | ||
| - "127.0.0.1:5433:5432" | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "pg_isready -U litellm -d litellm"] | ||
| interval: 5s | ||
| timeout: 5s | ||
| retries: 10 | ||
|
|
||
| clickhouse: | ||
| image: clickhouse/clickhouse-server:26.9.6.6 | ||
| environment: | ||
| CLICKHOUSE_USER: default | ||
| CLICKHOUSE_PASSWORD: local-tracing-write | ||
| CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: "1" | ||
| volumes: | ||
| - clickhouse_data:/var/lib/clickhouse | ||
| ports: | ||
| - "127.0.0.1:18123:8123" | ||
| healthcheck: | ||
| test: ["CMD", "clickhouse-client", "--user", "default", "--password", "local-tracing-write", "--query", "SELECT 1"] | ||
| interval: 5s | ||
| timeout: 5s | ||
| retries: 20 | ||
|
|
||
| volumes: | ||
| postgres_data: | ||
| clickhouse_data: | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,14 @@ | ||||||||||||||
| model_list: | ||||||||||||||
| - model_name: gpt-5.6 | ||||||||||||||
| litellm_params: | ||||||||||||||
| model: openai/gpt-5.6 | ||||||||||||||
| api_key: os.environ/OPENAI_API_KEY | ||||||||||||||
|
|
||||||||||||||
| general_settings: | ||||||||||||||
| master_key: os.environ/LITELLM_MASTER_KEY | ||||||||||||||
| tracing: | ||||||||||||||
| store: clickhouse | ||||||||||||||
|
|
||||||||||||||
| litellm_settings: | ||||||||||||||
| success_callback: | ||||||||||||||
| - clickhouse | ||||||||||||||
|
Comment on lines
+12
to
+14
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Failed requests lose spend rows When configured through
Suggested change
Was this helpful? React with 👍 or 👎 to provide feedback. |
||||||||||||||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟨 Local tracing stack uses fixed credentials
The compose stack starts with fixed database credentials and a short proxy master key. Running it outside a local test environment exposes privileged access with known credentials
Was this helpful? React with 👍 or 👎 to provide feedback.