Skip to content

Commit f20d4f5

Browse files
committed
fix(agents): log warning on streaming parser fallback
Address PR review comment: replace silent except with a warning log when ijson streaming parser fails.
1 parent 8e7b1f9 commit f20d4f5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

agents/tools/analyze_trace.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ def _load_events(trace_path):
116116
return events
117117
except ImportError:
118118
pass
119-
except Exception:
120-
pass
119+
except Exception as e:
120+
print(f" [Warning] Streaming parser failed: {e}. Falling back to standard parser.")
121121
with open(trace_path, "r") as f:
122122
data = json.load(f)
123123
return data if isinstance(data, list) else data.get("traceEvents", [])

0 commit comments

Comments
 (0)