Remove `_experiments` replay options compat shim in v9

Open Beginner friendly
#5,882 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
typescript
Domain
mobile

Research direction

Start by reading the compat shim in packages/core/src/js/integrations/default.ts and the related option definitions in options.ts. Remove the two deprecated _experiments replay options and assess whether initialScope belongs in the same cleanup. Done means the shim and deprecated type definitions are gone, with the v9 deprecation scope resolved.

Written by the indexing model from the issue text.

Description

React-Native Replays Task

Summary

The _experiments.replaysSessionSampleRate and _experiments.replaysOnErrorSampleRate options were deprecated in favor of the root-level replaysSessionSampleRate / replaysOnErrorSampleRate options. A compat shim in packages/core/src/js/integrations/default.ts copies the old values to the new location at init time.

The original comment said "Remove in the next major version (v7)", but this was missed in both v7 and v8. Updated to v9 in #5881.

Action for v9

  • Remove the compat shim in default.ts (lines 144-154)
  • Remove the _experiments.replaysSessionSampleRate and _experiments.replaysOnErrorSampleRate type definitions from options.ts
  • Consider also removing the initialScope option (deprecated since v5, replacement: getGlobalScope() / getIsolationScope())

References

Dominant language
TypeScript
Stars
1.8k
Forks
367
Avg merge
1d 6h
Merged PRs (30d)
94

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getsentry/sentry-react-native

All issues in getsentry/sentry-react-native

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.