Skip to content

Unable to override only a few options for replayIntegration #10305

Closed

Description

@joshkel

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/react

SDK Version

7.95.0

Framework Version

React 18.2.0

Link to Sentry event

No response

SDK Setup

initSentry({
  dsn,
  integrations: [
      replayIntegration({
        maskAllText: true,
        blockAllMedia: true,
      }),
  ],
});

Steps to Reproduce

Pass a few options to replayIntegration in a TypeScript file.

Expected Result

Successful compilation - the changelog and migration docs make me think that this should work the same as new Replay({ maskAllText: true, blockAllMedia: true }).

Actual Result

Compilation errors - replayIntegration is declared as needing a nearly complete ReplayPluginOptions object, so it complains if any options are missing.

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀 2on Jan 23, 2024
  2. jiadesen commented on Jan 24, 2024

    @jiadesen

    me too

  3. Shubhdeep12 commented on Jan 24, 2024

    @Shubhdeep12
    Contributor

    Hi @mydea it looks like the issue is here for replay integration -

    export const replayIntegration = ((options?: InitialReplayPluginOptions) => {

    Reason - InitialReplayPluginOptions creates every option required except sessionSampleRate and errorSampleRate
    Suggested fix - the type for options should be ReplayConfiguration imported above and used in the constructor for the replay class.

    let me know if it is correct. I'll create a PR then.
    Thanks

  4. AbhiPrasad commented on Jan 24, 2024

    @AbhiPrasad
    Contributor

    @Shubhdeep12 feel free to throw up a PR, I think that is correct

  5. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 2on Jan 24, 2024
  6. Shubhdeep12 commented on Jan 24, 2024

    @Shubhdeep12
    Contributor

    ok great, added a PR @AbhiPrasad

  7. moved this to Waiting for: Product Owner in GitHub Issues with 👀 2on Jan 24, 2024
  8. added a commit that references this issue on Jan 24, 2024
    f613940
  9. ghost added on Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions