Skip to content

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.

chore(telemetry): remove unused _safe_telemetry_operation from crewai_core (#6977)

Vidit Ostwal871c9c5131f4
diff --git a/lib/crewai-core/src/crewai_core/telemetry.py b/lib/crewai-core/src/crewai_core/telemetry.py
index 913f20e8b..d83e464dd 100644
--- a/lib/crewai-core/src/crewai_core/telemetry.py
+++ b/lib/crewai-core/src/crewai_core/telemetry.py
@@ -270,18 +270,6 @@ class Telemetry:
"""
self.trace_set = self.ready
- def _safe_telemetry_operation(
- self, operation: Callable[[], Span | None]
- ) -> Span | None:
- """Run a span-returning telemetry operation, swallowing failures."""
- if not self._should_execute_telemetry():
- return None
- try:
- return operation()
- except Exception as e:
- logger.debug("Telemetry operation failed: %s", e)
- return None
-
def _safe_telemetry_procedure(self, operation: Callable[[], None]) -> None:
"""Run a void telemetry procedure, swallowing failures."""
if not self._should_execute_telemetry():