-
Notifications
You must be signed in to change notification settings - Fork 210
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 ms into slot when getHeader/getPayload requests start #508
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 #508 +/- ##
===========================================
- Coverage 70.24% 69.50% -0.74%
===========================================
Files 6 8 +2
Lines 541 1256 +715
===========================================
+ Hits 380 873 +493
- Misses 132 336 +204
- Partials 29 47 +18
Flags with carried forward coverage won't be shown. Click here to find out more.
|
b1a6ca0
to
1305e7f
Compare
Added one more commit to log with Info level when the getPayload request starts. This will be useful when debugging bug reports like #519 |
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.
tiny comments, but LGTM
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.
tiny comments, but LGTM
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.
makes sense and this PR in isolation generally makes sense
do we also want to log timings on the "backend" of each request, rather than just the "frontend" like we do in this PR?
what do you mean with that? |
right now it just timestamps when the request starts, we could also log the time when the request finishes (the "backend") e.g. add a log on 705 about finishing to match the log on 605 about starting |
this is not what's typically referred to as "the backend". I don't think we need another log there, we already have a log when the payload was received from the relay, and at the end of the function, the HTTP middleware also logs the complete request summary |
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.
lgtm!
📝 Summary
Log how late into the slot the
getHeader
andgetPayload
requests start.This is particularly useful if proposers submit logs to debug the "too late request" response from the relay (i.e. when the relay received the request >4 sec into the slot). To be specific, this can tell whether the request started too late in the first place, or if it's the network between the proposer and relay
Moved the
GetEnv*
methods to a newcommon
package, which also holds the default (mainnet) genesis time and slot time (12 sec). This removes the import ofgo-utils/cli
across the package too!✅ I have run these commands
make lint
make test-race
go mod tidy