From 7a170e56d657ca2b3642aec0c451de509ae391ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0trauch?= Date: Fri, 26 Jan 2024 21:15:14 +0100 Subject: [PATCH] Gather more errors in Sentry --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index 4fd4f2e..3f01e57 100644 --- a/main.go +++ b/main.go @@ -43,6 +43,7 @@ func _init() { // Connect to the NATS service nc, err = nats.Connect(config.NATSURL) if err != nil { + sentry.CaptureException(err) log.Fatalln(err) } @@ -103,6 +104,7 @@ func main() { start := time.Now() err := statsProcessor.GatherStats() if err != nil { + sentry.CaptureException(err) log.Println("LOOP ERROR:", err.Error()) } elapsed := time.Since(start) @@ -117,6 +119,7 @@ func main() { for { err := nodeProcessor.Log() if err != nil { + sentry.CaptureException(err) log.Println("NODE PERFORMANCE LOG ERROR:", err.Error()) } time.Sleep(5 * time.Minute)