From c56837384267299ba79255aef46dfa6af8d6df0c Mon Sep 17 00:00:00 2001 From: Erik Grinaker Date: Mon, 7 Aug 2023 08:10:35 +0000 Subject: [PATCH] Revert "logcrash: add `ReportTypeAssertionFailure`" This reverts commit 4ffc54c9940f96fcecc6a8a493fa76b88fa863d0. --- pkg/util/log/logcrash/crash_reporting.go | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/pkg/util/log/logcrash/crash_reporting.go b/pkg/util/log/logcrash/crash_reporting.go index 5c35fae3a7b0..ead3913e3a47 100644 --- a/pkg/util/log/logcrash/crash_reporting.go +++ b/pkg/util/log/logcrash/crash_reporting.go @@ -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. @@ -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 { @@ -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 }