Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion livekit-agents/livekit/agents/telemetry/traces.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,8 +685,14 @@ def _log(
try:
async with aiofiles.open(report.audio_recording_path, "rb") as f:
audio_bytes = await f.read()
except Exception:
except Exception as e:
audio_bytes = b""
logger.warning(
"failed to read audio recording for session report upload, "
"uploading without the audio part (path=%s): %s",
report.audio_recording_path,
e,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you use exc_info=e instead of %s?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks. Switched to exc_info=e and kept the path in the message, so the traceback comes through now instead of just str(e).

)

url = f"{observability_url}/observability/recordings/v0"

Expand Down