Skip to content

SDK internal errors being raised as events in Sentry. #9760

Closed as not planned
@rodolfoBee

Description

@rodolfoBee

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

Framework Version

No response

Link to Sentry event

No response

SDK Setup

Sentry.init({
   environment: env,
   dsn: "...",
   integrations: [
      new Sentry.BrowserTracing({
         tracePropagationTargets: [...],
      }),
      new Sentry.Replay(),
   ],

   tracesSampleRate: 1.0, 
   replaysSessionSampleRate: 0.001, 
   replaysOnErrorSampleRate: 1.0, 
   allowUrls: [...],
   ignoreErrors: [....],
});

Steps to Reproduce

The SDK is reaching the replay buffer limit (source code) when recording session replays. I was not able to reproduce it on my own account.

This is raising an event sent by the SDK to the project configured in the SDK initialisation:

Error
Event buffer exceeded maximum size of 20000000.

The current workaround for affected users is to filter these events with ignoreErrors:

Sentry.init({
  dsn: "...",
  ignoreErrors: ["Event buffer exceeded maximum size"],
  ...
});

Originally reported here

Expected Result

The SDK should gracefully drop the event exceeding buffer and not raise an exception captured by the unhandled rejection handler.

Actual Result

An event is sent to the Sentry project as in the screenshot (not adding link due to privacy):
Screenshot 2023-12-06 at 10 47 01

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Status

    Waiting for: Community

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions