Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

feat(cloud): Add telemetry retry queue for network resilience#7597

Merged
jr merged 5 commits into
mainfrom
feat/cloud-telemetry-retry-queue
Sep 17, 2025
Merged

feat(cloud): Add telemetry retry queue for network resilience#7597
jr merged 5 commits into
mainfrom
feat/cloud-telemetry-retry-queue

Conversation

@daniel-lxs

@daniel-lxs daniel-lxs commented Sep 2, 2025

Copy link
Copy Markdown
Member

Summary

Implements a retry queue for cloud telemetry events to prevent data loss during network failures.

Changes

  • Add RetryQueue class with workspace-scoped persistence
  • Queue failed telemetry events for automatic retry
  • Retry events every 60 seconds with fresh auth tokens
  • FIFO eviction when queue reaches 100 events
  • Persist queue across VS Code restarts

Implementation Details

  • RetryQueue: Manages failed requests with persistence and automatic retry logic
  • CloudTelemetryClient: Integrates retry queue to catch network errors
  • CloudService: Initializes retry queue with auth header provider

Testing

  • All existing tests pass (229 tests)
  • Added 8 new tests for RetryQueue functionality
  • TypeScript compilation successful

Context

This feature was migrated from RooCodeInc/Roo-Code-Cloud#744 to ensure telemetry data isn't lost during network failures or temporary server issues.

The retry queue activates when telemetry events fail due to network errors. Events are retried until successful or evicted by newer events.


Important

Introduces RetryQueue for retrying failed telemetry events in CloudTelemetryClient, with persistence and auth state handling.

  • Behavior:
    • Introduces RetryQueue to handle failed telemetry events in CloudTelemetryClient.
    • Retries events every 60 seconds with fresh auth tokens.
    • Supports FIFO eviction when queue reaches 100 events.
    • Persists queue across VS Code restarts.
    • Handles network errors, server errors (5xx), and rate limiting (429).
    • Does not retry on client errors (4xx) except 429.
  • Integration:
    • CloudService initializes RetryQueue with auth header provider.
    • CloudTelemetryClient uses RetryQueue to queue failed requests.
  • Testing:
    • Adds 8 new tests for RetryQueue functionality.
    • Ensures queue handles auth state changes, network errors, and rate limits.
  • Misc:
    • Exports RetryQueue and related types in index.ts.

This description was created by Ellipsis for f4242ca. You can customize this summary. It will automatically update as commits are pushed.

Loading
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Enhancement New feature or request lgtm This PR has been approved by a maintainer PR - Needs Review size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants