From 6950ac6572e59cea4db7e38d4ad8675d7f679df1 Mon Sep 17 00:00:00 2001 From: Brian Luong Date: Mon, 21 Nov 2022 16:44:26 -0800 Subject: [PATCH] fix: emit debug log on blockheight metric from websockets --- internal/checks/blockheight.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/checks/blockheight.go b/internal/checks/blockheight.go index 7568d00d..824333ac 100644 --- a/internal/checks/blockheight.go +++ b/internal/checks/blockheight.go @@ -153,7 +153,10 @@ func (c *BlockHeightCheck) GetError() error { func (c *BlockHeightCheck) subscribeNewHead() error { onNewHead := func(header *ethTypes.Header) { c.SetBlockHeight(header.Number.Uint64()) + + c.logger.Debug("Received blockheight over Websockets.", zap.Any("upstreamID", c.upstreamConfig.ID), zap.String("httpURL", c.upstreamConfig.HTTPURL), zap.Uint64("blockHeight", c.blockHeight)) c.metricsContainer.BlockHeight.WithLabelValues(c.upstreamConfig.ID, c.upstreamConfig.HTTPURL).Set(float64(c.blockHeight)) + c.webSocketError = nil c.blockHeightError = nil }