Commit df59cbf
authored
fix(checks): tighten checkToolErrorSpan to require non-ok span status (#141)
Simplify the tool error span check to focus on what matters: the span
status field must be set and must not be "ok". Previously the check
looked for a grab-bag of error indicators (data.error, data.exception,
gen_ai.tool.error, tags.error) in addition to status, which was overly
lenient — a span could pass by having any random error-like data key
even if the status itself was wrong.
The new check requires that span.status is present and is not "ok"
(e.g. "internal_error", "error"). This catches frameworks like
Python LangGraph where the tool span status is unset despite the tool
raising an exception.1 parent 1dd9ee2 commit df59cbf
1 file changed
+7
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
66 | 60 | | |
67 | | - | |
| 61 | + | |
68 | 62 | | |
69 | 63 | | |
70 | | - | |
| 64 | + | |
| 65 | + | |
71 | 66 | | |
72 | 67 | | |
73 | 68 | | |
| |||
0 commit comments