From 5de17037dec7d3d646b96e8a011d1833d2961430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20B=C3=B6ckli?= <42514703+boecklim@users.noreply.github.com> Date: Mon, 2 Dec 2024 08:36:55 +0100 Subject: [PATCH] refactor: Add status to callbacker logs (#683) --- internal/callbacker/sender.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/callbacker/sender.go b/internal/callbacker/sender.go index 768798c14..16b489a6e 100644 --- a/internal/callbacker/sender.go +++ b/internal/callbacker/sender.go @@ -111,6 +111,7 @@ func (p *CallbackSender) Send(url, token string, dto *Callback) (ok bool) { slog.String("url", url), slog.String("token", token), slog.String("hash", dto.TxID), + slog.String("status", dto.TxStatus), slog.String("err", err.Error())) return false } @@ -122,6 +123,7 @@ func (p *CallbackSender) Send(url, token string, dto *Callback) (ok bool) { slog.String("url", url), slog.String("token", token), slog.String("hash", dto.TxID), + slog.String("status", dto.TxStatus), slog.Int("retries", retries)) p.updateSuccessStats(dto.TxStatus) @@ -132,7 +134,8 @@ func (p *CallbackSender) Send(url, token string, dto *Callback) (ok bool) { slog.String("url", url), slog.String("token", token), slog.String("hash", dto.TxID), - slog.Int("retries", p.retries)) + slog.String("status", dto.TxStatus), + slog.Int("retries", retries)) p.stats.callbackFailedCount.Inc() return @@ -163,6 +166,7 @@ func (p *CallbackSender) SendBatch(url, token string, dtos []*Callback) (ok bool slog.String("url", url), slog.String("token", token), slog.String("hash", c.TxID), + slog.String("status", c.TxStatus), slog.Int("retries", retries)) p.updateSuccessStats(c.TxStatus) @@ -174,7 +178,7 @@ func (p *CallbackSender) SendBatch(url, token string, dtos []*Callback) (ok bool slog.String("url", url), slog.String("token", token), slog.Bool("batch", true), - slog.Int("retries", p.retries)) + slog.Int("retries", retries)) p.stats.callbackFailedCount.Inc() return