From 6cdfffe78fb3f739f5da2cb37758c9934a5dd116 Mon Sep 17 00:00:00 2001 From: TP Honey Date: Fri, 27 Sep 2024 11:31:54 +0100 Subject: [PATCH] (fix) give more information about heartbeat --- cmd/root.go | 1 + proc/proc.go | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index 4542c12a..e1371bcb 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -152,6 +152,7 @@ var rootCmd = &cobra.Command{ } } else if natsJWT != "" || natsNKeySeed != "" { natsTokenClient, err = createTokenClient(natsJWT, natsNKeySeed) + log.Info("Using NATS authentication, no heartbeat will be sent") if err != nil { log.WithError(err).Fatal("Error validating NATS authentication info") diff --git a/proc/proc.go b/proc/proc.go index 96263e5c..63ddb0c3 100644 --- a/proc/proc.go +++ b/proc/proc.go @@ -553,7 +553,10 @@ func InitializeAwsSourceEngine(ctx context.Context, name string, version string, startupErrorMutex.Lock() startupError = err startupErrorMutex.Unlock() - _ = e.SendHeartbeat(ctx) // Send the error immediately + brokenHeart := e.SendHeartbeat(ctx) // Send the error immediately + if brokenHeart != nil { + log.WithError(brokenHeart).Error("Error sending heartbeat") + } if err != nil { log.WithError(err).Debug("Error initializing sources")