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 30eeb4c commit 04e2b84Copy full SHA for 04e2b84
guardrails/telemetry/guard_tracing.py
@@ -179,10 +179,11 @@ def trace_guard_execution(
179
if isinstance(result, Iterator) and not isinstance(
180
result, ValidationOutcome
181
):
182
- return trace_stream_guard(guard_span, result, history)
183
- add_guard_attributes(guard_span, history, result)
184
- add_user_attributes(guard_span)
185
- return result
+ for res in trace_stream_guard(guard_span, result, history):
+ yield res
+ else:
+ add_guard_attributes(guard_span, history, result)
186
+ add_user_attributes(guard_span)
187
except Exception as e:
188
guard_span.set_status(status=StatusCode.ERROR, description=str(e))
189
raise e
0 commit comments