Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the name of the exception to the beforeSend callback failed breadcrumb. #2280

Closed
adinauer opened this issue Oct 7, 2022 · 2 comments · Fixed by #2591
Closed

Add the name of the exception to the beforeSend callback failed breadcrumb. #2280

adinauer opened this issue Oct 7, 2022 · 2 comments · Fixed by #2591
Assignees

Comments

@adinauer
Copy link
Member

adinauer commented Oct 7, 2022

Problem Statement

A failed beforeSend callback adds a breadcrumb that only contains the message of the exception.

} catch (Throwable e) {
options
.getLogger()
.log(
SentryLevel.ERROR,
"The BeforeSend callback threw an exception. It will be added as breadcrumb and continue.",
e);
final Breadcrumb breadcrumb = new Breadcrumb();
breadcrumb.setMessage("BeforeSend callback failed.");
breadcrumb.setCategory("SentryClient");
breadcrumb.setLevel(SentryLevel.ERROR);
if (e.getMessage() != null) {
breadcrumb.setData("sentry:message", e.getMessage());
}
event.addBreadcrumb(breadcrumb);
}

Solution Brainstorm

It would also be helpful if the type of the exception was visible on the Sentry UI as sometimes only the combination of the two tells you the full story.

@romtsn
Copy link
Member

romtsn commented Oct 12, 2022

The type of the exception only makes sense if the app is not obfuscated (because we do not de-obfuscate breadcrumbs at the moment), or if it's the exception from JDK.

Let's put this item on the TSC and also check what other SDKs are doing in this case. @adinauer will take care of it.

@adinauer
Copy link
Member Author

adinauer commented Mar 7, 2023

We decided not to add more details to the breadcrumb but instead no longer send event / transaction in case beforeSend / beforeSendTransaction throws. More details can be found in #2591

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
2 participants