Skip to content

[Replay] Make replay sample rates top-level config #6351

Description

@mydea

Problem Statement

Currently, replay sample rates are configured directly in the integration:

Sentry.init({
  sampleRate: 0.5,
  tracesSampleRate: 0.1,
  profilesSampleRate: 0.25,
  integrations: [
    new Replay({
      sessionSampleRate: 0.1,
      errorSampleRate: 1.0
    })
});

This is inconsistent.

Solution Brainstorm

We want to move these options to the top level:

Sentry.init({
  sampleRate: 0.5,
  tracesSampleRate: 0.1,
  profilesSampleRate: 0.25,
  replaysSampleRate: 0.5,
  replaysOnErrorSampleRate: 1.0,
  integrations: [
    new Replay()
});

The goal is, for now, to deprecate the "old" options directly on Replay and remove them in a later release.

Steps

  • Add new top-level options
  • Deprecate configuration in integration

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions