Skip to content

Programatically start recording. #4441

Open
@DeanGracey

Description

@DeanGracey

It doesn't seem possible to start a new recording session using the react native package as one can using the javascript package, i.e:

// You can access the active replay instance from anywhere in your code like this:
const replay = Sentry.getReplay();

// This starts in `session` mode, regardless of sample rates
replay.start();

I would like to start recording sessions based on the value of a feature flag, so I don't just want a sample rate as set in the Sentry.init call:

_experiments: {
      replaysSessionSampleRate: 1,
      replaysOnErrorSampleRate: 1,
    },

Am I missing something or is this something that could be supported in the future?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Needs Discussion

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions