Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce the failed signed beacon block metrics #255

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion strategies/signedbeaconblock/first/signedbeaconblock.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ func (s *Service) SignedBeaconBlock(ctx context.Context,
log := log.With().Str("provider", name).Str("block_id", opts.Block).Logger()

response, err := provider.SignedBeaconBlock(ctx, opts)
s.clientMonitor.ClientOperation(name, "signed beacon block", err == nil, time.Since(started))
if err != nil {
if errors.Is(err, context.Canceled) {
// The context has been canceled, due to another provider getting there first. This is fine.
Expand All @@ -78,10 +77,12 @@ func (s *Service) SignedBeaconBlock(ctx context.Context,
return
}
}
s.clientMonitor.ClientOperation(name, "signed beacon block", err == nil, time.Since(started))
log.Debug().Dur("elapsed", time.Since(started)).Err(err).Msg("Failed to obtain signed beacon block")

return
}
s.clientMonitor.ClientOperation(name, "signed beacon block", err == nil, time.Since(started))
log.Trace().Str("provider", name).Dur("elapsed", time.Since(started)).Msg("Obtained signed beacon block")

ch <- &signedBeaconBlockResp{
Expand Down
Loading