mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
More span tags in validator (#2162)
* add more tags to spans when proposing a block * more stuff tags on attestation span * add slot
This commit is contained in:
parent
ae4425ac2d
commit
f670a134a0
@ -22,6 +22,9 @@ var delay = params.BeaconConfig().SecondsPerSlot / 2
|
|||||||
func (v *validator) AttestToBlockHead(ctx context.Context, slot uint64) {
|
func (v *validator) AttestToBlockHead(ctx context.Context, slot uint64) {
|
||||||
ctx, span := trace.StartSpan(ctx, "validator.AttestToBlockHead")
|
ctx, span := trace.StartSpan(ctx, "validator.AttestToBlockHead")
|
||||||
defer span.End()
|
defer span.End()
|
||||||
|
span.AddAttributes(
|
||||||
|
trace.StringAttribute("validator", fmt.Sprintf("%#x", v.key.PublicKey.Marshal())),
|
||||||
|
)
|
||||||
|
|
||||||
v.waitToSlotMidpoint(ctx, slot)
|
v.waitToSlotMidpoint(ctx, slot)
|
||||||
|
|
||||||
@ -132,6 +135,14 @@ func (v *validator) AttestToBlockHead(ctx context.Context, slot uint64) {
|
|||||||
"shard": attData.Shard,
|
"shard": attData.Shard,
|
||||||
"slot": slot - params.BeaconConfig().GenesisSlot,
|
"slot": slot - params.BeaconConfig().GenesisSlot,
|
||||||
}).Info("Beacon node processed attestation successfully")
|
}).Info("Beacon node processed attestation successfully")
|
||||||
|
span.AddAttributes(
|
||||||
|
trace.Int64Attribute("slot", int64(slot-params.BeaconConfig().GenesisSlot)),
|
||||||
|
trace.StringAttribute("attestationHash", fmt.Sprintf("%#x", attResp.AttestationHash)),
|
||||||
|
trace.Int64Attribute("shard", int64(attData.Shard)),
|
||||||
|
trace.StringAttribute("blockRoot", fmt.Sprintf("%#x", attestation.Data.BeaconBlockRootHash32)),
|
||||||
|
trace.Int64Attribute("justifiedEpoch", int64(attData.JustifiedEpoch-params.BeaconConfig().GenesisEpoch)),
|
||||||
|
trace.StringAttribute("bitfield", fmt.Sprintf("%#x", aggregationBitfield)),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// waitToSlotMidpoint waits until halfway through the current slot period
|
// waitToSlotMidpoint waits until halfway through the current slot period
|
||||||
|
Loading…
Reference in New Issue
Block a user