litellm/tests/otel_tests
Yuneng Jiang e6f524f951
[Fix] Tests: Pick chat-completion OTEL trace by content, not recency
The /otel-spans endpoint returns process-wide spans and tags
most_recent_parent by max start_time. After tightening that route to
proxy_admin (sk-1234), the GET /otel-spans request itself emits auth
spans that beat the chat-completion spans on start_time, so
most_recent_parent now points at the request's own auth trace
(['postgres', 'postgres']) and the >=5-span assertion fails.

Pick the chat-completion trace by content: it is the only trace whose
span list is a superset of {postgres, redis, raw_gen_ai_request,
batch_write_to_db}. Verified locally end-to-end against
otel_test_config.yaml + OTEL_EXPORTER=in_memory: 3/3 runs green.
2026-05-04 20:35:09 -07:00
..
test_e2e_budgeting.py fix(tests): increase MAX_CALLS and reduce sleep in flaky e2e budget test 2026-03-13 00:04:31 -07:00
test_e2e_model_access.py [Test] Proxy E2E: Opt In To Client Mock Response For Model Access Tests 2026-04-30 17:05:31 -07:00
test_guardrails.py [Feat] Guardrails Load Balancing - Allow Platform admins to load balance between guardrails (#18181) 2025-12-19 00:08:03 +05:30
test_key_logging_callbacks.py [Fix] Proxy: Break managed-resources import cycle on Python 3.13 2026-05-04 20:05:24 -07:00
test_model_info.py [Feat] Allow setting supports_vision for Custom OpenAI endpoints + Added testing (#5821) 2024-09-21 11:35:55 -07:00
test_moderations.py test_basic_moderations_on_proxy_with_model 2025-10-27 13:49:47 -07:00
test_otel.py [Fix] Tests: Pick chat-completion OTEL trace by content, not recency 2026-05-04 20:35:09 -07:00
test_prometheus.py test(prometheus): update master-key hash assertions to alias 2026-04-30 03:09:52 +00:00
test_rerank.py fix: use fastuuid helper (#14903) 2025-09-25 15:47:01 -07:00
test_team_member_permissions.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_team_tag_routing.py fix: use fastuuid helper (#14903) 2025-09-25 15:47:01 -07:00