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

log slot-uid #536

Merged
merged 2 commits into from
Jun 22, 2023
Merged

log slot-uid #536

merged 2 commits into from
Jun 22, 2023

Conversation

metachris
Copy link
Collaborator

πŸ“ 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

@codecov-commenter
Copy link

codecov-commenter commented Jun 22, 2023

Codecov Report

Merging #536 (d90b92b) into develop (54eeaa2) will decrease coverage by 0.40%.
The diff coverage is 65.57%.

❗ 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     
Flag Coverage Ξ”
unittests 69.84% <65.57%> (-0.40%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Ξ”
cli/main.go 0.00% <0.00%> (ΓΈ)
cli/types.go 0.00% <0.00%> (ΓΈ)
server/mock_types.go 100.00% <ΓΈ> (ΓΈ)
server/types.go 70.00% <70.00%> (ΓΈ)
server/service.go 77.18% <75.32%> (+5.17%) ⬆️
server/utils.go 82.58% <85.15%> (+15.01%) ⬆️
server/mock_relay.go 88.44% <90.81%> (+5.58%) ⬆️
server/relay_entry.go 90.00% <100.00%> (+8.75%) ⬆️

... and 1 file with indirect coverage changes

michaelneuder
michaelneuder previously approved these changes Jun 22, 2023
@@ -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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: slotUID for consistency?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

// 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,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as above

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Collaborator

@michaelneuder michaelneuder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lg

@metachris metachris merged commit 8806696 into develop Jun 22, 2023
@metachris metachris deleted the uid-log branch June 22, 2023 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants