🔬 gate session renewal debug context behind a feature flag#4540
Merged
BenoitZugmeyer merged 1 commit intov7from Apr 29, 2026
Merged
🔬 gate session renewal debug context behind a feature flag#4540BenoitZugmeyer merged 1 commit intov7from
BenoitZugmeyer merged 1 commit intov7from
Conversation
The SessionRenewalEvent payload (cookie reads, session state snapshots) and the associated view context fields (is_session_renewal, renew_event) are only collected and propagated when the `session_renewal_debug_context` experimental feature flag is enabled.
Bundles Sizes Evolution
🚀 CPU Performance
🧠 Memory Performance
|
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 29cc270 | Docs | Datadog PR Page | Give us feedback! |
thomas-lebeau
approved these changes
Apr 29, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
The session renewal debug context (
SessionRenewalEventpayload — cookie reads, session statesnapshots, and the
is_session_renewal/renew_eventfields attached to view contexts) wasunconditionally collected on every session renewal. This adds unnecessary overhead and pollutes
view context for all users. Gating it behind a flag allows enabling it only when actively
investigating session lifecycle issues.
Changes
session_renewal_debug_contextexperimental feature flagSessionDebugContext(cookie reads, state snapshots) behind the flag;renewObservablenotifies withundefinedwhen the flag is offis_session_renewal/renew_eventto the renewed view context behind the flagTest instructions
yarn devand open the sandbox athttp://localhost:8080renew_eventoris_session_renewalfields appear on the resulting view event.session_renewal_debug_contexttoenableExperimentalFeaturesinsandbox/index.html): repeat and confirmrenew_eventwith full debug context appears on the view.Checklist