Repository navigation
fix(core): Fix stale deprecation references - #5881
Merged
Merged
Conversation
- Update `initialScope` deprecation to point to `getGlobalScope()`/ `getIsolationScope()` instead of removed `configureScope()` API - Update stale "Remove in v7" comment to "Remove in v9" since the `_experiments` replay options compat shim was not removed in v8 Ref: https://develop.sentry.dev/sdk/ Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
Contributor
The deprecation should show how to mutate the scope, not just how to get it. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
antonis
marked this pull request as ready for review
March 25, 2026 11:41
alwx
approved these changes
Mar 25, 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 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.
📢 Type of change
📜 Description
Fixes two stale deprecation references found during a review against the SDK Principles & Standards:
initialScopedeprecation points to removed API — The@deprecatedJSDoc oninitialScopereferencedSentry.configureScope(...), which was removed in JS SDK v8. Updated to point toSentry.getGlobalScope().setTag(...),Sentry.getGlobalScope().setUser(...), etc.Stale "Remove in v7" comment — The
_experiments.replaysSessionSampleRate/_experiments.replaysOnErrorSampleRatecompat shim indefault.tshad a comment saying "Remove in the next major version (v7)". We're on v8 and it wasn't removed, so updated to "v9". Tracked in Remove_experimentsreplay options compat shim in v9 #5882.💡 Motivation and Context
The SDK deprecation lifecycle standard requires deprecation notices to include the correct replacement API.
configureScopeno longer exists, so users following the deprecation guidance would hit a dead end.💚 How did you test it?
Documentation-only changes (JSDoc + code comment). No behavioral changes.
📝 Checklist
sendDefaultPIIis enabled🔮 Next steps
_experimentsreplay options compat shim in v9 #5882 — Remove the_experimentsreplay compat shim and other stale deprecations in v9console.warnfor deprecated options (per SDK standards)