[Flutter hybrid support] Add slotId support to Full/Incremental snapshot records - #3674
Closed
jonathanmos wants to merge 1 commit into
Closed
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the existing optional slotId tagging capability (already used by MetaRecord/FocusRecord) to MobileFullSnapshotRecord and MobileIncrementalSnapshotRecord, enabling Session Replay snapshot records to be correlated back to a native “slot” (e.g., for embedded engines like Flutter).
Changes:
- Updated the JSON schemas for full/incremental snapshot records to inherit from the slot-aware common record schema.
- Updated internal record creation and test forgeries to use the new constructor shape (with
slotIddefaulting tonull). - Updated the Session Replay module API surface files to reflect the public model change.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| features/dd-sdk-android-session-replay/src/test/kotlin/com/datadog/android/sessionreplay/forge/IncrementalSnapshotRecordForgeryFactory.kt | Generates incremental snapshot records including optional slotId for tests. |
| features/dd-sdk-android-session-replay/src/test/kotlin/com/datadog/android/sessionreplay/forge/FullSnapshotRecordForgeryFactory.kt | Generates full snapshot records including optional slotId for tests. |
| features/dd-sdk-android-session-replay/src/main/kotlin/com/datadog/android/sessionreplay/internal/processor/RecordedDataProcessor.kt | Constructs snapshot records using named args so slotId can safely default to null. |
| features/dd-sdk-android-session-replay/src/main/json/schemas/session-replay/mobile/incremental-snapshot-record-schema.json | Switches base schema to _slot-supported-common-record-schema.json to add slotId. |
| features/dd-sdk-android-session-replay/src/main/json/schemas/session-replay/mobile/full-snapshot-record-schema.json | Switches base schema to _slot-supported-common-record-schema.json to add slotId. |
| features/dd-sdk-android-session-replay/api/dd-sdk-android-session-replay.api | Updates API dump to include the new constructor/copy/component signatures and getSlotId(). |
| features/dd-sdk-android-session-replay/api/apiSurface | Updates checked-in API surface to include slotId: String? = null in both snapshot record constructors. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feature/flutter-support #3674 +/- ##
===========================================================
- Coverage 73.31% 73.24% -0.07%
===========================================================
Files 995 995
Lines 36312 36305 -7
Branches 6134 6136 +2
===========================================================
- Hits 26622 26591 -31
- Misses 7983 8002 +19
- Partials 1707 1712 +5
🚀 New features to boost your workflow:
|
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.
What does this PR do?
Extends the slotId field (already present on MetaRecord/FocusRecord) to MobileFullSnapshotRecord and MobileIncrementalSnapshotRecord, so full and incremental snapshot records can also be tagged with a slot identifier.
Motivation
Groundwork for correlating Session Replay records produced by an embedded rendering engine (e.g. Flutter) back to their placeholder slot on the native side.
Additional Notes
Review checklist (to be filled by reviewers)