From ede42bb01628c32efe4e3c47729baae2d28f5bd8 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 15 Dec 2023 16:43:01 +0100 Subject: [PATCH] Merge pull request #15990 from overleaf/tm-analytics-debug-log-consistency Add message with analytics event debug log (and log for all events) GitOrigin-RevId: 7ece70cc8ddafd806885d5012b1fdf7fdf6a003b --- .../Features/Analytics/AnalyticsManager.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/services/web/app/src/Features/Analytics/AnalyticsManager.js b/services/web/app/src/Features/Analytics/AnalyticsManager.js index 82b21de6f9..5f3fae80d2 100644 --- a/services/web/app/src/Features/Analytics/AnalyticsManager.js +++ b/services/web/app/src/Features/Analytics/AnalyticsManager.js @@ -66,14 +66,6 @@ function recordEventForSession(session, event, segmentation) { if (_isAnalyticsDisabled() || _isSmokeTestUser(userId)) { return } - logger.debug({ - analyticsId, - userId, - event, - segmentation, - isLoggedIn: !!userId, - createdAt: new Date(), - }) _recordEvent({ analyticsId, userId, @@ -182,6 +174,17 @@ function _recordEvent( ) return } + logger.debug( + { + analyticsId, + userId, + event, + segmentation, + isLoggedIn: !!userId, + createdAt: new Date(), + }, + 'queueing analytics event' + ) Metrics.analyticsQueue.inc({ status: 'adding', event_type: 'event' }) analyticsEventsQueue .add(