Skip to content

Commit eafb44c

Browse files
committed
CLDSRV-821: log backbeat routes
1 parent beca28e commit eafb44c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/server.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,13 @@ class S3Server {
126126
monitoringClient.httpActiveRequests.inc();
127127
const requestStartTime = process.hrtime.bigint();
128128

129-
// Skip server access logs for heartbeat and backbeat.
129+
// Skip server access logs for heartbeat.
130130
const isLoggingEnabled = _config.serverAccessLogs
131131
&& (_config.serverAccessLogs.mode === serverAccessLogsModes.LOG_ONLY
132132
|| _config.serverAccessLogs.mode === serverAccessLogsModes.ENABLED);
133-
if (isLoggingEnabled && !req.url.startsWith('/_/')) {
133+
const isInternalRoute = req.url.startsWith('/_');
134+
const isBackbeatRoute = req.url.startsWith('/_/backbeat/');
135+
if (isLoggingEnabled && (!isInternalRoute || isBackbeatRoute)) {
134136
// eslint-disable-next-line no-param-reassign
135137
req.serverAccessLog = {
136138
enabled: false,

0 commit comments

Comments
 (0)