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

fix: Setting the default level for crash events in Crashpad to fatal #852

Merged
merged 7 commits into from
Jun 23, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/backends/sentry_backend_breakpad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ sentry__breakpad_backend_callback(
dump_path = sentry__path_new(descriptor.path());
#endif
sentry_value_t event = sentry_value_new_event();
sentry_value_set_by_key(
event, "level", sentry__value_new_level(SENTRY_LEVEL_FATAL));

SENTRY_WITH_OPTIONS (options) {
sentry__write_crash_marker(options);
Expand Down
9 changes: 6 additions & 3 deletions src/backends/sentry_backend_crashpad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,12 @@ crashpad_backend_flush_scope(
// properties that we do not want here. But in case of a crash we use the
// crash-event filled in the crash-handler and on_crash/before_send
// respectively.
sentry_value_t event = sentry_value_is_null(data->crash_event)
? sentry_value_new_object()
: data->crash_event;
sentry_value_t event = data->crash_event;
if (sentry_value_is_null(event)) {
event = sentry_value_new_object();
sentry_value_set_by_key(
event, "level", sentry__value_new_level(SENTRY_LEVEL_FATAL));
Comment on lines +113 to +114
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

}

SENTRY_WITH_SCOPE (scope) {
// we want the scope without any modules or breadcrumbs
Expand Down