-
Notifications
You must be signed in to change notification settings - Fork 75
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
865-update-logs-and-metrics. Added the requestId to the server context. #898
Conversation
Codecov ReportBase: 74.75% // Head: 74.41% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #898 +/- ##
==========================================
- Coverage 74.75% 74.41% -0.34%
==========================================
Files 29 28 -1
Lines 1838 1841 +3
Branches 344 348 +4
==========================================
- Hits 1374 1370 -4
- Misses 367 371 +4
- Partials 97 100 +3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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
DCO also
@@ -134,11 +135,48 @@ app.getKoaApp().use(async (ctx, next) => { | |||
} | |||
}); | |||
|
|||
app.getKoaApp().use(async (ctx, next) => { |
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.
Let's look to rework this method next sprint.
Could see readability and testability improvements
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.
Okay
Signed-off-by: ebadiere <[email protected]>
Signed-off-by: ebadiere <[email protected]>
Signed-off-by: ebadiere <[email protected]>
40370de
to
1f8e64b
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
…t. (#898) * 865-update-logs-and-metrics. Added the requestId to the server context. Signed-off-by: ebadiere <[email protected]> * Added missing formatters.ts file. Signed-off-by: ebadiere <[email protected]> * Updated year in copyright. Signed-off-by: ebadiere <[email protected]> --------- Signed-off-by: ebadiere <[email protected]>
…t. (#898) * 865-update-logs-and-metrics. Added the requestId to the server context. Signed-off-by: ebadiere <[email protected]> * Added missing formatters.ts file. Signed-off-by: ebadiere <[email protected]> * Updated year in copyright. Signed-off-by: ebadiere <[email protected]> --------- Signed-off-by: ebadiere <[email protected]> Signed-off-by: Nana Essilfie-Conduah <[email protected]>
Cherry pick PRs that went into main branch since cutting a 0.18.0-alpha1. PRs map to individual commits - [PR 882 - eth_feeHistory invalid cached response](#882) - [PR 887 - Needed changes for metrics improvements](#887) - [PR 883 - Handle GRPC timeout error](#883) - PR 898 - update-logs-and-metrics Added the requestId to the server context](#898) --------- Signed-off-by: ebadiere <[email protected]> Signed-off-by: Nana Essilfie-Conduah <[email protected]> --------- Signed-off-by: nikolay <[email protected]> Signed-off-by: Nana Essilfie-Conduah <[email protected]> Signed-off-by: Alfredo Gutierrez <[email protected]> Signed-off-by: Ivo Yankov <[email protected]> Signed-off-by: ebadiere <[email protected]> Co-authored-by: Nikolay Atanasow <[email protected]> Co-authored-by: Alfredo Gutierrez <[email protected]> Co-authored-by: Ivo Yankov <[email protected]> Co-authored-by: Eric Badiere <[email protected]>
…t. (#898) * 865-update-logs-and-metrics. Added the requestId to the server context. Signed-off-by: ebadiere <[email protected]> * Added missing formatters.ts file. Signed-off-by: ebadiere <[email protected]> * Updated year in copyright. Signed-off-by: ebadiere <[email protected]> --------- Signed-off-by: ebadiere <[email protected]>
This PR modifies rate limited logs in order to include the requestId in a standard log message.
Adds a Koa requestId package that supports storing the requestId in the application context.
Fixes #885
Notes for reviewer:
Provides the request ID in the logs right as the rateLimit for a given IP is triggered, in the standard log format.
Existing tests cover rateLimited requests.