Skip to content

Ref: Add warning to session replay#1205

Merged
lucas-zimerman merged 4 commits intomainfrom
lz/depr-sr
Apr 2, 2026
Merged

Ref: Add warning to session replay#1205
lucas-zimerman merged 4 commits intomainfrom
lz/depr-sr

Conversation

@lucas-zimerman
Copy link
Copy Markdown
Collaborator

@lucas-zimerman lucas-zimerman commented Apr 2, 2026

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 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

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

Close #1202

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Internal Changes 🔧

  • Add warning to session replay by lucas-zimerman in #1205
  • Update validate-pr workflow by stephanie-anderson in #1198
  • Pin GitHub Actions to full-length commit SHAs by joshuarli in #1180

🤖 This preview updates automatically when you update the PR.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

if (
browserOptions.replaysSessionSampleRate ||
browserOptions.replaysOnErrorSampleRate
) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

@antonis antonis left a comment

Choose a reason for hiding this comment

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

LGTM

@lucas-zimerman lucas-zimerman merged commit 6c878fb into main Apr 2, 2026
22 checks passed
@lucas-zimerman lucas-zimerman deleted the lz/depr-sr branch April 2, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate Session Replay

2 participants