Skip to content

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

Closed
@mydea

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions