Skip to content

Commit ee6a625

Browse files
committed
fixup! CLDSRV-750: add analytics fields to server access logs
1 parent 4fd7876 commit ee6a625

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/utilities/serverAccesssLogger.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,8 @@ function logServerAccess(params, req, res) {
280280
bytesReceived: req.parsedContentLength || 0,
281281
bodyLength: parseInt(req.headers['content-length'], 10) || 0,
282282
contentLength: req.parsedContentLength || 0,
283+
// eslint-disable-next-line camelcase
284+
elapsed_ms: params.startTime && params.endTime ? (params.endTime - params.startTime) / 1_000_000 : null,
283285

284286
// AWS access server logs fields https://docs.aws.amazon.com/AmazonS3/latest/userguide/LogFormat.html
285287
startTime: params.startTime ? params.startTime.toString() : null, // AWS "Time" field

0 commit comments

Comments
 (0)