Skip to content

fix(core): Fix stale deprecation references - #5881

Merged
antonis merged 2 commits into
mainfrom
antonis/fix-stale-deprecations
Mar 25, 2026
Merged

antonis merged 2 commits into
mainfrom
antonis/fix-stale-deprecations

Conversation

@antonis

@antonis antonis commented Mar 25, 2026 •

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Fixes two stale deprecation references found during a review against the SDK Principles & Standards:

  1. initialScope deprecation points to removed API — The @deprecated JSDoc on initialScope referenced Sentry.configureScope(...), which was removed in JS SDK v8. Updated to point to Sentry.getGlobalScope().setTag(...), Sentry.getGlobalScope().setUser(...), etc.

  2. Stale "Remove in v7" comment — The _experiments.replaysSessionSampleRate / _experiments.replaysOnErrorSampleRate compat shim in default.ts had 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 _experiments replay options compat shim in v9 #5882.

💡 Motivation and Context

The SDK deprecation lifecycle standard requires deprecation notices to include the correct replacement API. configureScope no 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

  • 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

- 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]>
@github-actions

github-actions Bot commented Mar 25, 2026 •

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

⚪ None (no version bump detected)

📋 Changelog Preview

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


  • fix(core): Fix stale deprecation references by antonis in #5881
  • chore(deps): bump activesupport from 7.0.8.6 to 7.2.3.1 in /samples/react-native-macos by dependabot in #5870
  • chore(deps): bump activesupport from 6.1.7.10 to 7.2.3.1 in /samples/react-native by dependabot in #5869
  • chore(deps): bump yauzl to ^3.2.1 by antonis in #5855
  • chore(deps): bump appium from 2.4.1 to 3.2.2 by antonis in #5856
  • fix(ios): Guard replay postInit behind runtime session replay check by antonis in #5858
  • Add better needs_web check to CI by alwx in #5863
  • chore(deps): bump fast-xml-parser to ^5.5.7 by antonis in #5854
  • CI: detect-changes workflow to only check the affected components on the CI side by alwx in #5843
  • chore(deps): bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.24.1 to 2.25.0 by dependabot in #5861
  • chore(deps): bump getsentry/craft from 2.24.1 to 2.25.0 by dependabot in #5862
  • chore(deps): bump github/codeql-action from 4.32.6 to 4.34.1 by dependabot in #5860
  • chore(deps): update JavaScript SDK to v10.45.0 by github-actions in #5848
  • chore(deps): bump flatted from 3.4.1 to 3.4.2 by dependabot in #5853
  • chore(deps): update Cocoa SDK to v9.8.0 by github-actions in #5847
  • fix(tracing): Guard getNewScreenTimeToDisplay behind enableTimeToInitialDisplay by antonis in #5849
  • chore(deps): bump json from 2.16.0 to 2.17.1.2 in /performance-tests by dependabot in #5844
  • chore(docs): Add changelog entry for duplicated breadcrumbs fix by antonis in #5851
  • fix(tracing): Unsubscribe spanEnd listeners after they fire to prevent accumulation by antonis in #5840
  • fix(android): Properly remove duplicated breadcrumbs by vovkasm in #5841
  • fix(tracing): Skip native frames and stall tracking for unsampled spans by antonis in #5842

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actions Bot commented Mar 25, 2026 •

Copy link
Copy Markdown
Contributor
Fails
🚫 Pull request is not ready for merge, please add the "ready-to-merge" label to the pull request

Generated by 🚫 dangerJS against 4032701

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
antonis marked this pull request as ready for review March 25, 2026 11:41
@antonis
antonis merged commit d5079ff into main Mar 25, 2026
51 of 55 checks passed
@antonis
antonis deleted the antonis/fix-stale-deprecations branch March 25, 2026 12:29
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.

2 participants