🎨 [PANA-7353] Clean up naming in recording code#4628
Open
sethfowler-datadog wants to merge 1 commit into
Open
Conversation
Bundles Sizes Evolution
🚀 CPU Performance
🧠 Memory Performance
|
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: b51d153 | Docs | Datadog PR Page | Give us feedback! |
gonzalezreal
approved these changes
May 18, 2026
Comment on lines
-39
to
43
| * ChangeSerializationTransaction is used to build and emit a BrowserChangeRecord | ||
| * SerializationTransaction is used to build and emit a BrowserChangeRecord | ||
| * containing a serialized snapshot of the DOM. Unlike SerializationTransaction, it | ||
| * doesn't support emitting arbitrary BrowserRecords; instead, the builder methods it | ||
| * exposes are used to construct a single BrowserChangeRecord which is emitted at the end | ||
| * of the transaction. |
There was a problem hiding this comment.
🤏🏽 This comment has become nonsensical 😄. The original compared ChangeSerializationTransaction to a (now-gone) sibling SerializationTransaction.
| import type { TimeStamp } from '@datadog/browser-core' | ||
| import type { RumConfiguration } from '@datadog/browser-rum-core' | ||
| import { forEachChildNodes, getNodePrivacyLevel } from '@datadog/browser-rum-core' | ||
| import { registerCleanupTask } from '../../../../../core/test' |
There was a problem hiding this comment.
nit: I see this import has been changed to '@datadog/browser-core/test' in other spec files. Should we normalize all of them?
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.
Motivation
I'm about to start pushing a major new round of session replay improvements. Before that process starts, I'd like to take a moment to perform some cleanup. In SDK v6, the SDK included two serialization algorithms: the original one (
v1) and the then-experimental replacement (change). In SDK v7, we've totally replaced thev1algorithm with thechangealgorithm, but the split that previously existing remains visible in the naming of many functions and types which specify that they generate "change" output or work with the "change" codepath. Now that there's only one codepath, including "change" in all these names is unnecessary. Let's clean it up to make things a little less verbose.Changes
This PR removes the term "change" everywhere in the recording code where it occurs unnecessarily. The term still appears, but only in places where it involves serialization logic for the
Changerecord type itself; it's no longer spread throughout the code base.This is a pure refactoring change; no functionality has been altered.
Checklist