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 e0c0a86 commit efd81acCopy full SHA for efd81ac
src/openlayer/lib/tracing/tracer.py
@@ -402,7 +402,14 @@ def create_step(
402
latency = (new_step.end_time - new_step.start_time) * 1000 # in ms
403
new_step.latency = latency
404
405
- _current_step.reset(token)
+ try:
406
+ _current_step.reset(token)
407
+ except ValueError as e:
408
+ # Handle context variable mismatch gracefully
409
+ # This can occur when async generators cross context boundaries
410
+ if "was created in a different Context" not in str(e):
411
+ raise
412
+
413
_handle_trace_completion(
414
is_root_step=is_root_step,
415
step_name=name,
0 commit comments