Repository navigation
Conversation
3 of 5 tasks
❌ ErrorsYour PR has failed checks. Please review the issues below and take necessary action before merging. 🚦 1 Pipeline job failed
ℹ️ InfoNo other issues found (see more)🧪 All tests passed 🎯 Code Coverage (details) Useful? React with 👍 / 👎 This comment will be updated automatically if new data arrives.🔗 Commit SHA: 5a54e9b | Docs | View more details | Give us feedback! |
Bundles Sizes Evolution
|
bdibon
force-pushed
the
boris.dibon/websocket-vitals-6-page-discard
branch
from
October 1, 2026 11:59
753d90e to
7bcbfc7
Compare
This was referenced Oct 1, 2026
bdibon
added this pull request to stack #5099
October 1, 2026 12:13
bdibon
marked this pull request as ready for review
October 1, 2026 12:18
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
pagehide without persisted (the page is not entering the back/forward cache) now notifies PageExitReason.PAGE_DISCARDED, replacing the unused PAGEHIDE reason. The batch flushes on it like on any other exit. Session Replay (mutations, segments, replay resources) and click actions ignore it, so it is never a segment creation reason and their behaviour is unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
bdibon
force-pushed
the
boris.dibon/websocket-vitals-6-page-discard
branch
from
October 8, 2026 08:09
7bcbfc7 to
bcc3173
Compare
On PAGE_DISCARDED every tracked connection, whatever its phase, reports its closed vital with the new page_unloaded tracking end reason, instead of a pulse: the page is going away, and no close event will follow. The batch then sends them with the rest of the page exit flush. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
bdibon
force-pushed
the
boris.dibon/websocket-vitals-6-page-discard
branch
from
October 8, 2026 08:45
bcc3173 to
5a54e9b
Compare
This branch has not been deployed
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
A connection still open when the page is unloaded never gets a close event the SDK can observe, so it would end without a closed vital. Tracking now ends explicitly when the page is discarded.
Part of the WebSocket vitals stack. Every PR targets the previous one; the first one targets the
boris.dibon/websocket-vitalsintegration branch, which is merged intomainin one go once the whole stack is approved. #5055 stays open as the reference implementation: the tip of this stack is content-identical to it, rebased on the currentmain.Changes
Commit by commit:
pagehidewithoutpersisted(not entering the back/forward cache) notifiesPageExitReason.PAGE_DISCARDED, replacing the unusedPAGEHIDEreason. The batch flushes on it like on any other exit. Session Replay (mutation flush, segments, replay resources) and click actions ignore it, so their behaviour is unchanged and it never becomes a segment creation reason.page_unloadedtracking end reason, instead of a pulse.pagehide).After this PR, the stack tip is content-identical to #5055 rebased on
main.Test instructions
yarn test:unit --spec "packages/browser-rum-core/src/domain/webSocket/*.spec.ts" --spec packages/browser-rum-core/src/browser/webSocketObservable.spec.ts --spec packages/browser-core/src/browser/pageMayExitObservable.spec.ts --spec packages/browser-rum-core/src/domain/action/trackClickActions.spec.ts --spec packages/browser-rum/src/boot/datadogRecorder.spec.ts --spec "packages/browser-rum/src/domain/segmentCollection/*.spec.ts" --spec packages/browser-rum-core/src/transport/startRumBatch.spec.tsyarn test:e2e -g "rum websockets"git diff origin/boris.dibon/websocket-rc1-data-model origin/boris.dibon/websocket-vitals-6-page-discard -- $(git diff --name-only origin/main...origin/boris.dibon/websocket-rc1-data-model)only shows whatmainchanged since ✨ Update WebSocket data model #5055 branched: thev7.15.0version inpackage.json, ✨ enable partial view updates by default for all customers #5071 inconfiguration.ts, andyarn.lock.Note
check-staging-mergeis expected to fail:staging-40already contains the earlier merge of #5055, which touches the same files. It clears at the next staging bump; the other checks should be green.Checklist