We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 38a2d62 commit 2df8b1aCopy full SHA for 2df8b1a
1 file changed
src/backend/api/api_routes.py
@@ -67,13 +67,15 @@
67
logging.WARNING
68
)
69
70
+
71
def record_exception_to_trace(e):
72
"""Record exception to the current OpenTelemetry trace span."""
73
span = trace.get_current_span()
74
if span is not None:
75
span.record_exception(e)
76
span.set_status(Status(StatusCode.ERROR, str(e)))
77
78
79
# start processing the batch
80
@router.post("/start-processing")
81
async def start_processing(request: Request):
@@ -424,7 +426,6 @@ async def get_batch_status(request: Request, batch_id: str):
424
426
track_event_if_configured(
425
427
"BatchStoryRetrieved", {"batch_id": batch_id, "user_id": user_id}
428
-
429
return batch_data
430
except HTTPException as e:
431
record_exception_to_trace(e)
0 commit comments