From 18a3d95e4f7a0d83db94fd265fce5184697542c1 Mon Sep 17 00:00:00 2001 From: Preslav Gerchev Date: Tue, 29 Oct 2024 15:47:57 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Log=20err=20if=20heartbeat=20fai?= =?UTF-8?q?ls.=20(#4790)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Preslav --- providers/running_provider.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/providers/running_provider.go b/providers/running_provider.go index 7c0453fb25..db8f5e4fed 100644 --- a/providers/running_provider.go +++ b/providers/running_provider.go @@ -137,11 +137,13 @@ func (c *connectionGraph) garbageCollect() []uint32 { return collected } -type ReconnectFunc func() (pp.ProviderPlugin, *plugin.Client, error) -type connectReq struct { - req *pp.ConnectReq - cb pp.ProviderCallback -} +type ( + ReconnectFunc func() (pp.ProviderPlugin, *plugin.Client, error) + connectReq struct { + req *pp.ConnectReq + cb pp.ProviderCallback + } +) const maxRestartCount = 3 @@ -359,6 +361,7 @@ func (p *RunningProvider) doOneHeartbeat(t time.Duration) error { Interval: uint64(t), }) if err != nil { + log.Err(err).Str("plugin", p.Name).Msg("error in plugin heartbeat") if status, ok := status.FromError(err); ok { if status.Code() == 12 { return errors.New("please update the provider plugin for " + p.Name)