From ae4425ac2d9a6c55a7851280a66ef6d31fdd49f6 Mon Sep 17 00:00:00 2001 From: Preston Van Loon Date: Thu, 4 Apr 2019 20:07:15 -0500 Subject: [PATCH] add more tags to spans when proposing a block (#2161) --- validator/client/validator_propose.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/validator/client/validator_propose.go b/validator/client/validator_propose.go index 7e0594d77..b5bc44b90 100644 --- a/validator/client/validator_propose.go +++ b/validator/client/validator_propose.go @@ -28,6 +28,7 @@ func (v *validator) ProposeBlock(ctx context.Context, slot uint64) { } ctx, span := trace.StartSpan(ctx, "validator.ProposeBlock") defer span.End() + span.AddAttributes(trace.StringAttribute("validator", fmt.Sprintf("%#x", v.key.PublicKey.Marshal()))) log.Info("Performing a beacon block proposal...") // 1. Fetch data from Beacon Chain node. // Get current head beacon block. @@ -117,6 +118,11 @@ func (v *validator) ProposeBlock(ctx context.Context, slot uint64) { log.WithError(err).Error("Failed to propose block") return } + span.AddAttributes( + trace.StringAttribute("blockRoot", fmt.Sprintf("%#x", blkResp.BlockRootHash32)), + trace.Int64Attribute("numDeposits", int64(len(block.Body.Deposits))), + trace.Int64Attribute("numAttestations", int64(len(block.Body.Attestations))), + ) log.WithFields(logrus.Fields{ "blockRoot": fmt.Sprintf("%#x", blkResp.BlockRootHash32), }).Info("Proposed new beacon block")