fix(observability): retry recording upload connection failures - #2350
Open
rosetta-livekit-bot[bot] wants to merge 1 commit into
Open
fix(observability): retry recording upload connection failures#2350rosetta-livekit-bot[bot] wants to merge 1 commit into
rosetta-livekit-bot[bot] wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: f0735cb The changes in this PR will be included in the next version bump. This PR includes changesets to release 28 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports livekit/agents#6977.
Summary
@livekit/agentsTesting
pnpm test -- agents(49 files, 728 passed, 2 skipped)pnpm build:agentspnpm --filter @livekit/agents lintpnpm exec prettier --check "agents/src/**/*.{ts,tsx,md,json}"Source diff coverage
livekit-agents/livekit/agents/telemetry/traces.py->agents/src/telemetry/traces.ts. Implemented the same retry and timeout policy using Nodeform-data/HTTPS request lifecycle events: pre-connect coded network failures are retryable, TLS and post-connect failures are not, and total/connect timers are local to this upload.livekit-agents/livekit/agents/utils/http_context.py. agents-js has no shared aiohttp-style session or global 900-second timeout to restore; the parity outcome is the upload-local timeout implementation above.tests/test_http_context_helper.py. There is no target shared HTTP context counterpart; timeout scoping is covered in the telemetry upload tests.tests/test_recording.py->agents/src/telemetry/traces.test.ts. Ported every added behavior: extended upload timeout configuration, connection failure retries, RetryInfo retries, non-RetryInfo failure, no retry for total timeout/post-send disconnect/TLS failure, and retry exhaustion.Ported from livekit/agents#6977
Original PR description
Recording/session report uploads can fail before request transmission. Retry DNS, connection, and connection-timeout failures, plus responses that explicitly include protobuf
RetryInfo. Do not retry total timeouts or post-send disconnects because the upload POST is not idempotent.Keep the 900-second timeout on this upload only. Other users of the shared HTTP session use aiohttp defaults again.
Addresses AGT-3354
Initial prompt and agent context
Model: GPT-5.6