From b5b190db4bd6bef9a83dde75195c3f8869460c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emir=20Ribi=C4=87?= Date: Sun, 28 Jul 2024 12:50:00 +0200 Subject: [PATCH] add logger name to logrus integration --- logrus/logrusentry.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/logrus/logrusentry.go b/logrus/logrusentry.go index f9d921651..d95358655 100644 --- a/logrus/logrusentry.go +++ b/logrus/logrusentry.go @@ -13,6 +13,7 @@ import ( // The identifier of the Logrus SDK. const sdkIdentifier = "sentry.go.logrus" +const name = "logrus" // These default log field keys are used to pass specific metadata in a way that // Sentry understands. If they are found in the log fields, and the value is of @@ -153,6 +154,7 @@ func (h *Hook) entryToEvent(l *logrus.Entry) *sentry.Event { Extra: data, Message: l.Message, Timestamp: l.Time, + Logger: name, } key := h.key(FieldRequest) if req, ok := s.Extra[key].(*http.Request); ok {