From 3348d0e63674700527a1737fd2c4335b435423f8 Mon Sep 17 00:00:00 2001 From: Gurjot Date: Mon, 23 Dec 2024 01:43:26 +0530 Subject: [PATCH 1/3] add logs --- internal/v2/queue/handler/stats.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/v2/queue/handler/stats.go b/internal/v2/queue/handler/stats.go index 4a297054..4738a80f 100644 --- a/internal/v2/queue/handler/stats.go +++ b/internal/v2/queue/handler/stats.go @@ -29,6 +29,10 @@ func (h *V2QueueHandler) ActiveStakingHandler(ctx context.Context, messageBody s // TODO: Perform the address lookup conversion // https://github.com/babylonlabs-io/staking-api-service/issues/162 + log.Debug(). + Str("staking_tx", activeStakingEvent.StakingTxHashHex). + Msg("processing active delegation event") + statsErr := h.Services.V2Service.ProcessActiveDelegationStats( ctx, activeStakingEvent.StakingTxHashHex, @@ -53,6 +57,10 @@ func (h *V2QueueHandler) UnbondingStakingHandler(ctx context.Context, messageBod return types.NewError(http.StatusBadRequest, types.BadRequest, err) } + log.Debug(). + Str("staking_tx", unbondingStakingEvent.StakingTxHashHex). + Msg("processing unbonding delegation event") + // Perform the stats calculation statsErr := h.Services.V2Service.ProcessUnbondingDelegationStats( ctx, From bf1e9831e9f13d4fcae28c6a5c11c3cdade4bb7e Mon Sep 17 00:00:00 2001 From: Gurjot Date: Mon, 23 Dec 2024 01:43:58 +0530 Subject: [PATCH 2/3] pub image --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 442dec48..23ca270b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,6 +4,7 @@ on: push: branches: - 'main' + - 'gusin13/debug-stats' tags: - '*' From 67b6a6d1326260dc10017ac93af09df63b577d3c Mon Sep 17 00:00:00 2001 From: Gurjot Date: Mon, 23 Dec 2024 01:45:21 +0530 Subject: [PATCH 3/3] add logs --- internal/v2/queue/handler/stats.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/v2/queue/handler/stats.go b/internal/v2/queue/handler/stats.go index 4738a80f..d33e45e6 100644 --- a/internal/v2/queue/handler/stats.go +++ b/internal/v2/queue/handler/stats.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "net/http" + "strconv" "github.com/babylonlabs-io/staking-api-service/internal/shared/types" queueClient "github.com/babylonlabs-io/staking-queue-client/client" @@ -31,6 +32,7 @@ func (h *V2QueueHandler) ActiveStakingHandler(ctx context.Context, messageBody s log.Debug(). Str("staking_tx", activeStakingEvent.StakingTxHashHex). + Str("staking_amount", strconv.FormatUint(activeStakingEvent.StakingAmount, 10)). Msg("processing active delegation event") statsErr := h.Services.V2Service.ProcessActiveDelegationStats( @@ -59,6 +61,7 @@ func (h *V2QueueHandler) UnbondingStakingHandler(ctx context.Context, messageBod log.Debug(). Str("staking_tx", unbondingStakingEvent.StakingTxHashHex). + Str("staking_amount", strconv.FormatUint(unbondingStakingEvent.StakingAmount, 10)). Msg("processing unbonding delegation event") // Perform the stats calculation