Skip to content

JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.

Python

fix(observability): skip root span when agent_observability not enabled

hwxiajing2b55f666b177
diff --git a/jiuwenswarm/agents/harness/agent_observability.py b/jiuwenswarm/agents/harness/agent_observability.py
index 78397aa502..29c93951e3 100644
--- a/jiuwenswarm/agents/harness/agent_observability.py
+++ b/jiuwenswarm/agents/harness/agent_observability.py
@@ -219,6 +219,8 @@ def open_agent_run_span(*, session_id: str = "", mode: str = "") -> Any:
if not is_initialized():
return None
+ if not _agent_observability_active:
+ return None
tracer = get_tracer("jiuwenswarm.agent")
name = _build_run_span_name(mode=mode, session_id=session_id)