diff --git a/lib/crewai/src/crewai/telemetry/telemetry.py b/lib/crewai/src/crewai/telemetry/telemetry.py index 848ba11330..84e089a093 100644 --- a/lib/crewai/src/crewai/telemetry/telemetry.py +++ b/lib/crewai/src/crewai/telemetry/telemetry.py @@ -392,9 +392,7 @@ def _operation() -> None: self._add_attribute(span, "platform_system", platform.system()) self._add_attribute(span, "platform_version", platform.version()) self._add_attribute(span, "cpus", os.cpu_count()) - self._add_attribute( - span, "crew_inputs", json.dumps(inputs) if inputs else None - ) + self._add_attribute(span, "crew_inputs", json.dumps(inputs or {})) else: self._add_attribute( span, @@ -707,9 +705,7 @@ def _operation() -> None: self._add_attribute(span, "model_name", model_name) if crew.share_crew: - self._add_attribute( - span, "inputs", json.dumps(inputs) if inputs else None - ) + self._add_attribute(span, "inputs", json.dumps(inputs or {})) close_span(span) @@ -814,9 +810,7 @@ def _operation() -> Span: add_crew_attributes( span, crew, self._add_attribute, include_fingerprint=False ) - self._add_attribute( - span, "crew_inputs", json.dumps(inputs) if inputs else None - ) + self._add_attribute(span, "crew_inputs", json.dumps(inputs or {})) self._add_attribute( span, "crew_agents",