From e5917724dccf09de93e173fcf5b9136a18f2e9d3 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Wed, 12 Mar 2025 10:20:15 +0530 Subject: [PATCH] resort to show total number of spans and traces --- src/agents/tracing/processors.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/agents/tracing/processors.py b/src/agents/tracing/processors.py index 282bc23..308adf2 100644 --- a/src/agents/tracing/processors.py +++ b/src/agents/tracing/processors.py @@ -78,9 +78,6 @@ class BackendSpanExporter(TracingExporter): logger.warning("OPENAI_API_KEY is not set, skipping trace export") return - traces: list[dict[str, Any]] = [] - spans: list[dict[str, Any]] = [] - data = [item.export() for item in items if item.export()] payload = {"data": data} @@ -100,7 +97,7 @@ class BackendSpanExporter(TracingExporter): # If the response is successful, break out of the loop if response.status_code < 300: - logger.debug(f"Exported {len(traces)} traces, {len(spans)} spans") + logger.debug(f"Exported {len(items)} items") return # If the response is a client error (4xx), we wont retry