fix: Make Session Replay stable for offline or intermittent network#67
Merged
abelonogov-ld merged 9 commits intomainfrom Nov 4, 2025
Merged
fix: Make Session Replay stable for offline or intermittent network#67abelonogov-ld merged 9 commits intomainfrom
abelonogov-ld merged 9 commits intomainfrom
Conversation
It puts failed items in the failedItems and try them until network is restored
auto-merge was automatically disabled
November 3, 2025 16:52
Pull request was closed
| currentSize += item.cost | ||
| } | ||
|
|
||
| func earliest(cost: Int, limit: Int, except: Set<ObjectIdentifier>) -> (id: ObjectIdentifier, items: [EventQueueItem], cost: Int)? { |
Contributor
There was a problem hiding this comment.
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)? { |
Contributor
There was a problem hiding this comment.
same suggestion, so you can reuse the object here
Contributor
Author
There was a problem hiding this comment.
Here is private method
mario-launchdarkly
approved these changes
Nov 4, 2025
abelonogov-ld
pushed a commit
that referenced
this pull request
Nov 4, 2025
🤖 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 -->
abelonogov-ld
added a commit
that referenced
this pull request
Nov 4, 2025
* 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
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.
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.