litellm/tests/unit/integrations/otel
devin-ai-integration[bot] b4fcc5c1bc
fix(otel): read the registered v2 logger without importing the proxy (#44485)
* fix(otel): read the registered v2 logger without importing the proxy

phase_span, which the router enters on every deployment pick since #44150, looked up the
proxy's OTel logger by importing litellm.proxy.proxy_server. In an SDK process that import
loads the whole proxy synchronously on the caller's event loop during its first request,
which stalled litellm_router_unit_testing past its 5s wait. Read the module from
sys.modules instead: when the proxy was never imported it has no registered logger.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(otel): pin the no-proxy-import guarantee in-process

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: mateo <mateo@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-04 03:17:07 -07:00
..
__init__.py test: move tests/test_litellm integrations and secret_managers into tests/unit (#43194) 2026-09-25 12:57:07 -07:00
test_db_endpoint.py fix(otel): name postgres service spans by operation and table (#44240) 2026-10-03 09:20:28 -07:00
test_langfuse_logger.py test: move tests/test_litellm integrations and secret_managers into tests/unit (#43194) 2026-09-25 12:57:07 -07:00
test_otel_v2_baggage.py test: move tests/test_litellm integrations and secret_managers into tests/unit (#43194) 2026-09-25 12:57:07 -07:00
test_otel_v2_components.py fix(otel): nest cache spans under their operation and name service spans by purpose (#44150) 2026-10-03 09:20:27 -07:00
test_otel_v2_config_baggage_parenting_guardrails.py fix(otel): tolerate non-dict callback_settings.otel and ignore bare EXCLUDED_SERVICES env (#44086) 2026-10-02 12:36:46 -07:00
test_otel_v2_destinations.py fix(otel): nest cache spans under their operation and name service spans by purpose (#44150) 2026-10-03 09:20:27 -07:00
test_otel_v2_dynamic.py feat(otel): add SigNoz preset for OpenTelemetry v2 (#43296) 2026-09-26 18:15:45 -07:00
test_otel_v2_emitter.py test: move tests/test_litellm integrations and secret_managers into tests/unit (#43194) 2026-09-25 12:57:07 -07:00
test_otel_v2_logger.py perf(proxy): stop prompt-cache eligibility from tokenizing the whole conversation (#44221) 2026-10-03 09:20:28 -07:00
test_otel_v2_metrics.py test: move tests/test_litellm integrations and secret_managers into tests/unit (#43194) 2026-09-25 12:57:07 -07:00
test_otel_v2_mount.py test: move tests/test_litellm integrations and secret_managers into tests/unit (#43194) 2026-09-25 12:57:07 -07:00
test_otel_v2_multibackend.py test: move tests/test_litellm integrations and secret_managers into tests/unit (#43194) 2026-09-25 12:57:07 -07:00
test_otel_v2_presets.py feat(otel): add SigNoz preset for OpenTelemetry v2 (#43296) 2026-09-26 18:15:45 -07:00
test_otel_v2_sources_of_truth.py test: move tests/test_litellm integrations and secret_managers into tests/unit (#43194) 2026-09-25 12:57:07 -07:00
test_otel_v2_vendor_mappers.py fix(otel): send cache and reasoning tokens in langfuse usage_details (#43553) 2026-09-28 21:30:56 -07:00
test_runtime.py fix(otel): read the registered v2 logger without importing the proxy (#44485) 2026-10-04 03:17:07 -07:00