From 3179eae75bce340bfd8e1baaf562612a14fc4af9 Mon Sep 17 00:00:00 2001 From: yuneng Date: Thu, 24 Sep 2026 09:35:55 +0000 Subject: [PATCH] test: mutation drop cost span (do not merge) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm/integrations/otel/logger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/integrations/otel/logger.py b/litellm/integrations/otel/logger.py index 0466e00a959..aba65feffcc 100644 --- a/litellm/integrations/otel/logger.py +++ b/litellm/integrations/otel/logger.py @@ -651,7 +651,7 @@ class OpenTelemetryV2(CustomLogger): # gets a live phase span instead). Those still feed Prometheus/Datadog via # their own hooks; they just never enter the trace. role: Final = span_role_for_service(data.service_name) - if role is None: + if role is None or data.service_name == "batch_write_to_db": return None # A metrics-only ping with neither timing nor a parent (in-memory queue # gauges) is not a traceable operation; a span for it would be a