Ref: Add warning to session replay#1205
Conversation
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| if ( | ||
| browserOptions.replaysSessionSampleRate || | ||
| browserOptions.replaysOnErrorSampleRate | ||
| ) { |
There was a problem hiding this comment.
Falsy check skips deprecation warning for zero values
Low Severity
The truthy check on replaysSessionSampleRate and replaysOnErrorSampleRate treats 0 the same as undefined. A user who explicitly sets either option to 0 (a valid sample rate meaning "record none") won't see the deprecation warning, even though they are actively using a deprecated option that will be removed in v4. Comparing against undefined instead of relying on truthiness would correctly detect all explicitly configured values.
There was a problem hiding this comment.
if user sets to 0 then they will never see a replay, there is already a deprecation mark on it. Lets keep the warning only if users are using it.


📢 Type of change
📜 Description
This PR adds warnings for users using session replay that it will be deprecated on the next major version.
💡 Motivation and Context
Session replay doesn't work so we are dropping support for it.
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled🔮 Next steps
Close #1202