litellm/tests/e2e/logging
yucheng-berri 948a43cd64
test(e2e): otel trace completeness on /chat/completions (#33132)
* test(e2e): OTEL trace completeness on /chat/completions against a local Jaeger destination

Adds the logging-suite infrastructure for LIT-3787 trace-completeness coverage:
a jaeger service in the compose stack as the OTEL v2 destination (arize_phoenix
preset pointed at it via PHOENIX_COLLECTOR_HTTP_ENDPOINT, so gen-AI spans export
through a preset-owned provider - the code path where trace splits happen), a
typed Jaeger query read-back client, and the first test: one successful
non-streaming /chat/completions call exports ONE complete trace (root SERVER
span + auth/db/cost children + gen-AI CLIENT span, no dangling parents).

* test(e2e): harden the otel trace read-back per review

Jaeger reads now query server-side by the litellm.call_id span tag instead of
paging recent traces and filtering client-side; the compose stack's background
jobs alone can push a request trace past the page. A failed query hard-fails
instead of reading as an empty result, the settle predicate now also waits for
the prefix-matched db span the assertion demands, parent-chain walking follows
CHILD_OF references only, the zero-trace and split-trace failures get distinct
messages, jaeger gets a healthcheck so the depends_on condition is accurate,
and the chat docstring names the route the code actually asserts

* test(e2e): author the chat trace test docstring

* Update logging section in CLAUDE.md

Removed mention of OTEL trace-tree completeness from logging integration section.
2026-07-13 19:06:12 -07:00
..
conftest.py test(e2e): otel trace completeness on /chat/completions (#33132) 2026-07-13 19:06:12 -07:00
logging_client.py fix(guardrails): filter Add-Guardrail mode dropdown per provider (#32712) 2026-07-11 14:51:27 -07:00
otel_client.py test(e2e): otel trace completeness on /chat/completions (#33132) 2026-07-13 19:06:12 -07:00
test_langfuse_e2e.py test(e2e): cover Langfuse logging.yaml P0 logs_spend cells (#32857) 2026-07-11 14:11:00 -04:00
test_otel_trace_e2e.py test(e2e): otel trace completeness on /chat/completions (#33132) 2026-07-13 19:06:12 -07:00
test_prometheus_cardinality_e2e.py test(e2e): close coverage gaps across chat/responses, provider features, batches, prometheus, and langfuse eviction (#32165) 2026-07-04 18:56:52 -07:00