Skip to content

If a user callback beforeAddRecordingEvent throws, don't report SDK internal error #8542

Closed

Description

@bruno-garcia

The try block calling the user code:

? replayOptions.beforeAddRecordingEvent(event)

Leads to the catch block that records internal SDK error:

client.recordDroppedEvent('internal_sdk_error', 'replay');

This can make debugging a high number of internal sdk errors

Some ideas:
We could add the invocation to a different try/catch block. Drop the event in case of an error.
Alternatively we could record a breadcrumb:

https://github.com/getsentry/sentry-dotnet/blob/2bee53c4a2ae9bcc72a7f3f72f9675b064849cfb/src/Sentry/SentryClient.cs#L352-L375

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions