- Make console.log statements conditional based on debug flag
- Add singleton reset method for TelemetryQueueManager
- Fix race condition in persistQueue with debouncing and promise tracking
- Improve error handling in PostHogTelemetryClient to differentiate error types
- Make retry interval configurable in QueuedTelemetryClient
- Update tests to reflect 24-hour event expiration instead of retry-based removal
- Add test for handling corrupted JSON queue files
- Fix test expectations for retry count and event filtering
- Implement TelemetryQueueManager for persistent event storage
- Add QueuedTelemetryClient base class with retry logic
- Update PostHogTelemetryClient to use queuing system
- Store queue per-workspace to avoid conflicts
- Add exponential backoff retry (1s to 60s max)
- Events persist for 24 hours before expiring
- Queue limited to 100 events to manage file size
- Add comprehensive tests for queue functionality
- Disable PostHog's internal queue for better control
This ensures telemetry events are not lost during network
outages or server downtime, with events persisted to disk
and retried automatically when connectivity is restored.
This PR adds filtering of git repository properties from telemetry data and includes git info in telemetry properties, with comprehensive tests.
Behavior:
PostHogTelemetryClient now filters out repositoryUrl, repositoryName, and defaultBranch from telemetry events.
ClineProvider includes git repository information in telemetry properties, filtered by clients.
Functions:
Added isPropertyCapturable() in BaseTelemetryClient to allow property filtering.
Implemented getGitRepositoryInfo() and getWorkspaceGitInfo() in git.ts to extract git info.
Tests:
Added tests for isPropertyCapturable() in PostHogTelemetryClient.test.ts.
Added tests for getGitRepositoryInfo() and getWorkspaceGitInfo() in git.spec.ts.