Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

chore - handle case when otel metadata field value is None

Ishaan Jaffb468c58fe599
diff --git a/litellm/integrations/opentelemetry.py b/litellm/integrations/opentelemetry.py
index 877fccd1e33..f0e961234ce 100644
--- a/litellm/integrations/opentelemetry.py
+++ b/litellm/integrations/opentelemetry.py
@@ -159,6 +159,8 @@ class OpenTelemetry(CustomLogger):
if event_metadata:
for key, value in event_metadata.items():
+ if value is None:
+ value = "None"
if isinstance(value, dict):
try:
value = str(value)