From eadcb23729f3f99655a85ea1f9e5b6ddd94ca5e5 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Mon, 22 Nov 2021 18:45:21 -0300 Subject: [PATCH] Remove duplicate 'name' key from rate limiter logs --- app/lib/server/startup/rateLimiter.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/lib/server/startup/rateLimiter.js b/app/lib/server/startup/rateLimiter.js index 464404b88048..e10921f3e8de 100644 --- a/app/lib/server/startup/rateLimiter.js +++ b/app/lib/server/startup/rateLimiter.js @@ -108,10 +108,9 @@ const checkNameForStream = (name) => name && !names.has(name) && name.startsWith const ruleIds = {}; -const callback = (message, name) => (reply, input) => { +const callback = (msg, name) => (reply, input) => { if (reply.allowed === false) { - logger.info('DDP RATE LIMIT:', message); - logger.info({ ...reply, ...input }); + logger.info({ msg, reply, input }); metrics.ddpRateLimitExceeded.inc({ limit_name: name, user_id: input.userId,