Skip to content

[PANA-6704] Allow multiple formats in BrowserFullSnapshot records#373

Merged
sethfowler-datadog merged 2 commits intomasterfrom
seth.fowler/PANA-6704-update-change-format
Apr 1, 2026
Merged

[PANA-6704] Allow multiple formats in BrowserFullSnapshot records#373
sethfowler-datadog merged 2 commits intomasterfrom
seth.fowler/PANA-6704-update-change-format

Conversation

@sethfowler-datadog
Copy link
Copy Markdown
Contributor

For better compatibility with older mobile SDKs, it would be helpful if BrowserChange records were represented as BrowserFullSnapshot records when they represented a full snapshot. This would enable mobile SDKs which receive these records from webviews to set metadata accurately on the segments that include these records.

This PR makes this possible by adding an optional format property to BrowserFullSnapshot records. When format is unset, or has the value SnapshotFormatV1, the data property is interpreted as containing a snapshot in original V1 format. When format has the value SnapshotFormatChange, the data property is interpreted as containing a snapshot in the new Change format.

This change is backwards compatible from a data format perspective, since any BrowserFullSnapshot without a format property is interpreted in the same way it would be today, but code which interacts with the data property may need changes to avoid triggering TypeScript errors. I'll make the necessary changes in downstream repos after this lands.

@sethfowler-datadog sethfowler-datadog requested review from a team as code owners March 27, 2026 16:47
Copy link
Copy Markdown
Contributor

@simaoseica-dd simaoseica-dd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! And no ramifications to Mobile. 👌

Copy link
Copy Markdown
Contributor

@mormubis mormubis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sethfowler-datadog sethfowler-datadog merged commit 5a80fb9 into master Apr 1, 2026
12 checks passed
@sethfowler-datadog sethfowler-datadog deleted the seth.fowler/PANA-6704-update-change-format branch April 1, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants