-
Notifications
You must be signed in to change notification settings - Fork 0
fix: Make Session Replay stable for offline or intermittent network #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It puts failed items in the failedItems and try them until network is restored
Pull request was closed
| currentSize += item.cost | ||
| } | ||
|
|
||
| func earliest(cost: Int, limit: Int, except: Set<ObjectIdentifier>) -> (id: ObjectIdentifier, items: [EventQueueItem], cost: Int)? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest to use an object instead a tuple
| return (id: earlistEvent.id, items: items, cost: cost) | ||
| } | ||
|
|
||
| private func first(cost: Int, limit: Int, items: [EventQueueItem]) -> (items: [EventQueueItem], cost: Int)? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same suggestion, so you can reuse the object here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is private method
🤖 I have created a release *beep* *boop* --- ## [0.9.0](0.8.1...0.9.0) (2025-11-04) ### Features * cold, warm and hot launch times meter ([#66](#66)) ([060338b](060338b)) ### Bug Fixes * Make Session Replay stable for offline or intermittent network ([#67](#67)) ([4ff18c5](4ff18c5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Release 0.9.0 adding launch time meters and improving Session Replay stability, with version metadata and changelog updates. > > - **Release 0.9.0**: > - **Feature**: Adds meters for cold, warm, and hot launch times. > - **Bug fix**: Improves Session Replay stability for offline/intermittent networks. > - **Versioning/Docs**: > - Bumps version to `0.9.0` in `Sources/LaunchDarklyObservability/Version.swift` and `.release-please-manifest.json`. > - Updates `CHANGELOG.md` with new entries. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 1c9d651. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
* main: chore(main): release 0.9.0 (#68) fix: Make Session Replay stable for offline or intermittent network (#67) feat: cold, warm and hot launch times meter (#66) # Conflicts: # Sources/Observability/Logs/LogItem.swift # Sources/Observability/Transport/BatchWorker.swift # Sources/Observability/Transport/EventQueue.swift
Note
Make batching resilient with per-exporter queues and backoff, route payloads to specific exporters, refactor UI interaction pipeline with multi-yield, and wire Session Replay through the shared context.
BatchWorkerinto an actor with per-exporter scheduling, cost/parallelism limits, and exponential backoff with jitter on failures.MultiEventExporterwith direct exporter registry;EventExportingis nowSendableand exposestypeId.TransportServicecallsbatchWorker.start/stopasynchronously.EventQueueItemPayloadaddsexporterClass;EventQueueItemstoresexporterTypeId.EventQueuenow buckets by exporter, supportsearliest(cost:limit:except:)andremoveFirst(id:count:).exporterClasstoLogItem,TouchInteraction, andScreenImageItemto route to correct exporters.TouchInteractionYieldand makeUserInteractionManagerpublic with multi-listener support (addYield).TouchCaptureCoordinatornow accepts an optional yield and fans out viaUserInteractionManager.ObservabilityContext.userInteractionManager.addYieldto enqueue events.SessionReplayExporterwithBatchWorker; adjust event generation control flow.userInteractionManagertoObservabilityContextand pass through factory; remove direct queuing from factory interaction handler.Written by Cursor Bugbot for commit 0f6420b. This will update automatically on new commits. Configure here.