Skip to content

Commit

Permalink
Revert "logcrash: add ReportTypeAssertionFailure"
Browse files Browse the repository at this point in the history
This reverts commit 4ffc54c.
  • Loading branch information
erikgrinaker committed Aug 11, 2023
1 parent d451f7a commit c568373
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions pkg/util/log/logcrash/crash_reporting.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,6 @@ const (
// ReportTypeLogFatal signifies that this is an error report that
// was generated via a log.Fatal call.
ReportTypeLogFatal
// ReportTypeAssertionFailure signifies that an assertion was violated (see
// expect package).
ReportTypeAssertionFailure
)

// sendCrashReport posts to sentry.
Expand Down Expand Up @@ -379,8 +376,6 @@ func SendReport(
event.Tags["report_type"] = "error"
case ReportTypeLogFatal:
event.Tags["report_type"] = "log_fatal"
case ReportTypeAssertionFailure:
event.Tags["report_type"] = "assertion"
}

for _, f := range tagFns {
Expand Down Expand Up @@ -442,15 +437,13 @@ func RegisterTagFn(key string, value func(context.Context) string) {
tagFns = append(tagFns, tagFn{key, value})
}

func maybeSendCrashReport(ctx context.Context, err error, reportType ReportType) {
func maybeSendCrashReport(ctx context.Context, err error) {
// We load the ReportingSettings from global singleton in this call path.
if sv := getGlobalSettings(); sv != nil {
sendCrashReport(ctx, sv, err, reportType)
sendCrashReport(ctx, sv, err, ReportTypeLogFatal)
}
}

func init() {
log.MaybeSendCrashReport = func(ctx context.Context, err error) {
maybeSendCrashReport(ctx, err, ReportTypeLogFatal)
}
log.MaybeSendCrashReport = maybeSendCrashReport
}

0 comments on commit c568373

Please sign in to comment.