We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a41b320 commit d49bd89Copy full SHA for d49bd89
src/agents/tracing/processors.py
@@ -81,7 +81,17 @@ def export(self, items: list[Trace | Span[Any]]) -> None:
81
traces: list[dict[str, Any]] = []
82
spans: list[dict[str, Any]] = []
83
84
- data = [item.export() for item in items if item.export()]
+ # Categorize items into traces and spans
85
+ for item in items:
86
+ if hasattr(item, 'export') and callable(item.export):
87
+ export_data = item.export()
88
+ if export_data:
89
+ if isinstance(item, Trace):
90
+ traces.append(export_data)
91
+ else:
92
+ spans.append(export_data)
93
+
94
+ data = traces + spans
95
payload = {"data": data}
96
97
headers = {
0 commit comments