Skip to content

Session replays dropping #10935

@danerwilliams

Description

@danerwilliams

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.99.0

Framework Version

React 18.2.0

Link to Sentry event

No response

SDK Setup

Sentry.init({
    dsn: SENTRY_DSN,
    integrations: [
      new Sentry.BrowserTracing({
        routingInstrumentation: Sentry.reactRouterV6Instrumentation(
          React.useEffect,
          useLocation,
          useNavigationType,
          createRoutesFromChildren,
          matchRoutes
        ),
      }),
      Sentry.replayIntegration({
        maskAllText: false,
        blockAllMedia: false,
        maskAllInputs: false,
      }),
    ],
    environment: getEnvironment(),
    replaysSessionSampleRate: 1.0,
    replaysOnErrorSampleRate: 1.0,
    debug: getEnvironment() === Environment.PROD ? false : true,
  });

Steps to Reproduce

Open the web app and use it as normal, observe that often times (but not always) a session replay never records.

Expected Result

Expected /envelope requests to be sent by the sdk which contain data for session replay, and then the replay becomes available to view in the Sentry dashboard. /envelope requests are sent for the replay_event type along with the encoded data tracking the dom to recreate the recording in Sentry dashboard:
CleanShot 2024-03-05 at 12 08 38@2x
CleanShot 2024-03-05 at 12 08 21@2x
CleanShot 2024-03-05 at 12 08 10@2x

Actual Result

Case 1: /envelope requests are sent, but response throws an error for the envelope exceeding the replay recording size limit:

CleanShot 2024-03-02 at 09 47 00@2x
CleanShot 2024-03-05 at 11 54 35@2x

Case 2: /envelope requests are sent, but no session replay data is ever included, only session type events are sent no replay_event type events:

CleanShot 2024-03-05 at 12 02 02@2x
CleanShot 2024-03-05 at 12 01 41@2x

Sentry logs throw an error for the buffer size exceeding the limit.
CleanShot 2024-03-05 at 12 03 45@2x

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugPackage: reactIssues related to the Sentry React SDKPackage: replayIssues related to the Sentry Replay SDK

    Projects

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions