-
Notifications
You must be signed in to change notification settings - Fork 215
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
log slot-uid #536
log slot-uid #536
Conversation
Codecov Report
β Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## develop #536 +/- ##
===========================================
- Coverage 70.24% 69.84% -0.40%
===========================================
Files 6 8 +2
Lines 541 1290 +749
===========================================
+ Hits 380 901 +521
- Misses 132 340 +208
- Partials 29 49 +20
Flags with carried forward coverage won't be shown. Click here to find out more.
|
server/service.go
Outdated
@@ -348,6 +339,16 @@ func (m *BoostService) handleGetHeader(w http.ResponseWriter, req *http.Request) | |||
} | |||
uid := m.slotUID.uid | |||
m.slotUIDLock.Unlock() | |||
log = log.WithField("slotUid", uid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: slotUID
for consistency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
server/service.go
Outdated
// Prepare logger | ||
ua := UserAgent(req.Header.Get("User-Agent")) | ||
log = log.WithFields(logrus.Fields{ | ||
"ua": ua, | ||
"slot": payload.Message.Slot, | ||
"blockHash": payload.Message.Body.ExecutionPayloadHeader.BlockHash.String(), | ||
"parentHash": payload.Message.Body.ExecutionPayloadHeader.ParentHash.String(), | ||
"slotUid": uid, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lg
π Summary
Instead of just sending it as part of the request, also log the slot uid with the getHeader/getPayload log messages. This should further help debugging.
β I have run these commands
make lint
make test-race
go mod tidy