From 52f8133a5bad70fb7e9fa1d619366f8f9b1d88c6 Mon Sep 17 00:00:00 2001 From: Yucheng Zhu Date: Thu, 30 Jul 2026 20:20:48 -0700 Subject: [PATCH] docs(otel/v2): restore preset-registry comment wording; keep open-call LRU suppression on one line Restore the base wording of the dynamic-headers registry comment and dynamic_otlp_headers docstring in presets/__init__.py (pure churn), and keep the _open_llm_calls mutable-ok suppression on the construction line so the type-discipline gate still sees it. --- litellm/integrations/otel/logger.py | 2 +- litellm/integrations/otel/presets/__init__.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/litellm/integrations/otel/logger.py b/litellm/integrations/otel/logger.py index 114f0628b2a..966d34d4dc9 100644 --- a/litellm/integrations/otel/logger.py +++ b/litellm/integrations/otel/logger.py @@ -162,7 +162,7 @@ class OpenTelemetryV2(CustomLogger): event_recorder=self._init_events(logger_provider), ) self._tenant_tracers = TenantTracerCache(self.config, callback_name, LITELLM_TRACER_NAME) - self._open_llm_calls: OrderedDict[str, _LLMCallSpan] = OrderedDict() # mutable-ok: bounded LRU of open call spans + self._open_llm_calls: OrderedDict[str, _LLMCallSpan] = OrderedDict() # mutable-ok: open-call span LRU self._closed_call_ids: OrderedDict[str, None] = OrderedDict() # mutable-ok: bounded LRU of emitted call ids self._init_otel_logger_on_litellm_proxy() diff --git a/litellm/integrations/otel/presets/__init__.py b/litellm/integrations/otel/presets/__init__.py index ed41babe464..48c541310c1 100644 --- a/litellm/integrations/otel/presets/__init__.py +++ b/litellm/integrations/otel/presets/__init__.py @@ -31,8 +31,8 @@ from litellm.integrations.otel.presets.phoenix import phoenix_preset from litellm.integrations.otel.presets.weave import weave_dynamic_headers, weave_preset from litellm.types.utils import StandardCallbackDynamicParams -#: Callback name -> per-request OTLP header builder (team/key multi-tenant -#: routing). Only integrations that support dynamic credentials appear here; +#: Callback name → per-request OTLP header builder (team/key multi-tenant +#: routing). Only integrations that support dynamic credentials appear here — #: Arize-Phoenix/Langtrace/Levo/AgentOps/generic don't, so they use the logger's #: default tracer. DYNAMIC_HEADERS_BY_CALLBACK: dict[str, Callable[[StandardCallbackDynamicParams], dict[str, str]]] = { @@ -48,7 +48,7 @@ def dynamic_otlp_headers( ) -> dict[str, str] | None: """Per-request OTLP headers for ``callback_name``, or ``None`` if N/A. - ``None`` means "no per-request routing" -- the caller uses its default tracer. + ``None`` means "no per-request routing" — the caller uses its default tracer. """ builder = DYNAMIC_HEADERS_BY_CALLBACK.get(callback_name or "") if builder is None or not dynamic_params: