litellm/tests/unit/integrations/otel
paveln83 0fa086c529
refactor(typing): clear 66 basedpyright Any errors across 50 files (#55237)
* refactor(typing): narrow Any at header, JSON and callback-value sources

* refactor(typing): type root-cause Any sources together with their sinks

* refactor(typing): bind CLI attribute lookups and drop residual Any annotations

* test: pin spend activity route output and OTEL non-text credential headers

* fix(otel): keep non-text routing params refusing to route instead of falling back

Mixpanel token and region, New Relic region and SigNoz endpoint raise TypeError on a non-text value, as base raised AttributeError, so a span never goes to the operator default

* fix(otel): refuse list or dict dynamic credentials instead of sending them as text

A list or dict credential builds no tenant tracer and logs a TypeError, as main did for Arize, New Relic and SigNoz, while text and number credentials keep exporting as text

* fix(otel): send list or dict Langfuse and Weave keys as text, as main does

* fix(otel): keep main's default route for unhashable or bytes dynamic credentials

A callback with no OTLP exporter of its own warns and keeps the default
tracer again for list or dict credentials, bytes credentials are sent as
their text again, and SigNoz checks its endpoint before reading the key

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-12-01 04:58:03 +00: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 fix(responses): preserve incomplete status in synthetic streams (#52489) 2026-11-19 22:24:50 -08:00
test_otel_v2_baggage.py feat(otel): add Mixpanel OpenTelemetry v2 preset callback (#49999) 2026-11-25 10:27:02 -08:00
test_otel_v2_components.py feat(control_plane): ocsf audit events, sink protocol, queued delivery and hash chain (#49660) 2026-11-16 17:36:24 +00: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 feat(otel): add Mixpanel OpenTelemetry v2 preset callback (#49999) 2026-11-25 10:27:02 -08:00
test_otel_v2_dynamic.py refactor(typing): clear 66 basedpyright Any errors across 50 files (#55237) 2026-12-01 04:58:03 +00:00
test_otel_v2_emitter.py fix(langfuse otel): emit request metadata under langfuse.observation.metadata and langfuse.trace.metadata on the OTEL v2 Langfuse mapper (#42697) 2026-10-27 18:54:10 -07:00
test_otel_v2_logger.py feat(otel): group service spans by background job run (#54513) 2026-11-27 20:53:04 -08:00
test_otel_v2_metrics.py fix(otel): label configured pass-through routes litellm.passthrough and read the operation from the upstream (#48675) 2026-10-28 10:48:34 -07:00
test_otel_v2_mount.py fix(otel): keep the FastAPI server span when the proxy runs under ddtrace-run (#54016) 2026-11-30 16:47:05 -08: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_named_trace.py feat(langfuse_otel): group calls that share a metadata trace_id into one trace (#54408) 2026-11-26 00:58:20 +00:00
test_otel_v2_presets.py test(unit): make 21 flaky unit tests deterministic (#54785) 2026-11-26 20:48:13 -08:00
test_otel_v2_sources_of_truth.py feat(otel): group service spans by background job run (#54513) 2026-11-27 20:53:04 -08:00
test_otel_v2_vendor_mappers.py feat(otel): add Mixpanel OpenTelemetry v2 preset callback (#49999) 2026-11-25 10:27:02 -08:00
test_runtime.py feat(otel): trace auto-router configuration and classifier failures (#44926) 2026-10-06 15:40:34 -07:00