proud-lawyer-39815
10/09/2025, 8:46 PMtall-airline-16756
10/09/2025, 8:46 PMtall-airline-16756
10/09/2025, 8:46 PMaws_log_level in your S3 storage configuration to LogDebug or a similar level. This will help capture detailed AWS-related logs, giving you more insight.
• S3 Logger: The LiveKit storage module has an S3Logger that logs AWS errors during upload failures, such as permission problems. This can be really useful for pinpointing issues.
• Forward Logs: Consider forwarding runtime logs to tools like CloudWatch. This way, you can have centralized monitoring and easily correlate logs with AWS events.
Also, please double-check that your IAM role has the necessary permissions (like s3:PutObject) and is properly attached to the instance or service running LiveKit Egress. If you have any questions or need more help, just let me know—I’m happy to assist!
Sources: Log collection | LiveKit Docs | README.md | logging.goproud-lawyer-39815
10/09/2025, 8:47 PMtall-airline-16756
10/09/2025, 8:48 PMlog_level field to debug. Here’s an example to make it easier:
log_level: debug
api_key: your-api-key
api_secret: your-api-secret
ws_url: ws://your-livekit-server-url
redis:
address: your-redis-address
1. If you’re using Docker, please make sure the configuration file is properly mounted and referenced like this:
docker run --rm \
-e EGRESS_CONFIG_FILE=/out/config.yaml \
-v ~/egress-test:/out \
livekit/egress
1. And if you’re deploying with Helm, just set the log level in your values.yaml file like so:
egress:
log_level: debug
After setting this up, your egress service will start generating detailed logs, including GStreamer debugging at level 3. If you have any questions or need a hand with any of these steps, feel free to reach out—I’m here to help!
Sources: README.mdproud-lawyer-39815
10/10/2025, 5:09 PMreq = api.RoomCompositeEgressRequest(
room_name=ctx.room.name,
audio_only=True,
file_outputs=[
api.EncodedFileOutput(
file_type=api.EncodedFileType.OGG,
filepath=f"{file_root_name}.ogg",
s3=recording_storage,
)
],
)tall-airline-16756
10/10/2025, 5:09 PMRoomCompositeEgressRequest, you'll want to set up log forwarding for the LiveKit service itself. Here are some options you can choose from:
• Sentry: Simply add a SENTRY_DSN as a secret to your LiveKit Cloud project to forward logs to Sentry.
• Datadog: You can add a DATADOG_TOKEN (and optionally DATADOG_REGION) as a secret to forward logs to Datadog.
• CloudWatch: By adding AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY as secrets, and optionally setting AWS_REGION, you can integrate with CloudWatch.
• New Relic: Just add a New Relic key as a secret to enable log forwarding.
These logs will give you detailed runtime information about the egress process, including transcoding and S3 upload activities. If you prefer, you can also use the LiveKit CLI to follow runtime logs in real time from the latest agent instance. Please feel free to reach out if you'd like a hand setting up any of these options — I'm here to help!
Sources: Log collection | LiveKit Docs | Universal Egressproud-lawyer-39815
10/10/2025, 5:10 PMtall-airline-16756
10/10/2025, 5:11 PMvar asyncId = res.CaptureAudioFrame.AsyncId;
void Callback(CaptureAudioFrameCallback callback)
{
if (callback.AsyncId != asyncId) return;
if (callback.HasError)
Utils.Error($"Audio capture failed: {callback.Error}");
FfiClient.Instance.CaptureAudioFrameReceived -= Callback;
}
FfiClient.Instance.CaptureAudioFrameReceived += Callback;
• MediaRecorder Error Events: If you're working with browser-based recording, you can listen to the error event on the MediaRecorder object to catch any recording errors.
• AI Agent Error Handling: When using LiveKit Agents, try listening for the error event on the AgentSession object to manage both recoverable and unrecoverable errors.
Please let me know which setup you’re using, and I’d be happy to offer more personalized guidance to get you sorted out!
Sources: packages/livekit-rtc/src/proto/room_pb.ts | Runtime/Scripts/RtcAudioSource.cs | src/room/track/record.ts | Events and error handling | LiveKit Docs | livekit-ffi/src/server/audio_source.rsproud-lawyer-39815
10/10/2025, 5:12 PMtall-airline-16756
10/10/2025, 5:14 PMAgentSession.on("error", callback) method to catch errors related to STT, TTS, and other agent functions. Here’s a simple example to guide you:
async def handle_error(event):
error = event.error
print(f"Error: {error}")
if not error.recoverable:
await event.source.say("An unrecoverable error occurred.")
session.on("error", handle_error)
• Egress API Error Handling: When dealing with room recordings, it’s a good idea to manage errors right at the API call using try/catch blocks, like this:
try:
egress_info = await lkapi.egress.start_room_composite_egress(req)
print("Recording started:", egress_info.egress_id)
except Exception as e:
print("Failed to start recording:", str(e))
• Monitor Egress Status: It’s also helpful to keep an eye on the egress status by polling, so you can spot any issues during recording:
status = await lkapi.egress.list_egress(room_name="your-room")
for egress in status:
if egress.status == "failed":
print(f"Recording failed: {egress.error}")
If you’d like, I’m here to help you implement any of these methods or answer any questions you have along the way!
Sources: Events and error handling | LiveKit Docs | agent/main.py | Runtime/Scripts/RtcAudioSource.cs | livekit-rtc/livekit/rtc/_proto/ffi_pb2.pyiproud-lawyer-39815
10/10/2025, 5:15 PMtall-airline-16756
10/10/2025, 5:16 PMproud-lawyer-39815
10/10/2025, 5:17 PMtall-airline-16756
10/10/2025, 5:17 PM