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
This commit is contained in:
Thomas 2023-12-15 16:43:01 +01:00 committed by Copybot
parent 26ae6aebad
commit ede42bb016

View file

@ -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(