-
Notifications
You must be signed in to change notification settings - Fork 254
CLDSRV-821: add backbeat calls to logs #6050
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
base: development/9.2
Are you sure you want to change the base?
CLDSRV-821: add backbeat calls to logs #6050
Conversation
Hello leif-scality,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
b8f7e9c to
e733e90
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
@@ Coverage Diff @@
## development/9.2 #6050 +/- ##
===================================================
+ Coverage 84.35% 84.38% +0.02%
===================================================
Files 206 206
Lines 12997 13019 +22
===================================================
+ Hits 10964 10986 +22
Misses 2033 2033
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
e733e90 to
e145523
Compare
|
Should we log backbeat calls in Bucket Logging? |
|
Hello @leif-scality, can you confirm that backbeat calls will still be seen in Grafana dashboards, for CS and customers to troubleshoot and measure backbeat-backed features performance? Thank you. |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
dvasilas
left a comment
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 add tests for backbeat routes to tests/unit/utils/serverAccessLogger.js?
| if (isLoggingEnabled && !req.url.startsWith('/_/')) { | ||
| const isInternalRoute = req.url.startsWith('/_'); | ||
| const isBackbeatRoute = req.url.startsWith('/_/backbeat/'); | ||
| if (isLoggingEnabled && isInternalRoute ? isBackbeatRoute : true) { |
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: Could be refactored to
| if (isLoggingEnabled && isInternalRoute ? isBackbeatRoute : true) { | |
| if (isLoggingEnabled && (!isInternalRoute || isBackbeatRoute);) { |
| } | ||
|
|
||
| // eslint-disable-next-line no-param-reassign | ||
| request.serverAccessLog.analyticsAction = route.name; |
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.
| request.serverAccessLog.analyticsAction = route.name; | |
| request.serverAccessLog.analyticsAction = route?.name ?? 'BACKBEAT_INVALID'; |
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.
Normally route is never undefined or null because it is checked above, but added the check just in case
|
@scality-gdoumergue about
yes, however this improvement https://scality.atlassian.net/browse/RD-1246 won't be there yet. We will be working on it after it is merged. |
@francoisferrand we will not log internal backbeat calls in bucket logging. We add them to the |
This PR makes cloudserver write backbeat requests to the server access logs file.
loggingEnabledfield is always set tofalseto prevent the log from entering the server-access clickhouse table and it being consumed by log courier.operationfield is always set toREST.${req.method}.BACKBEATactionfield is set to the backbeat route orBACKBEAT_INVALIDif the route is not valid or does not exists.