mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #63 from overleaf/bg-log-out-of-order-events
log out of order events now that the rate is lower
This commit is contained in:
commit
9ecce32ff9
1 changed files with 2 additions and 3 deletions
|
@ -35,12 +35,11 @@ module.exports = EventLogger =
|
|||
return # order is ok
|
||||
if (count == previous)
|
||||
metrics.inc "event.#{channel}.duplicate"
|
||||
if Math.random() < 0.01
|
||||
logger.warn {channel:channel, message_id:message_id}, "duplicate event (sampled at 1%)"
|
||||
logger.warn {channel:channel, message_id:message_id}, "duplicate event"
|
||||
return "duplicate"
|
||||
else
|
||||
metrics.inc "event.#{channel}.out-of-order"
|
||||
# logger.warn {channel:channel, message_id:message_id, key:key, previous: previous, count:count}, "out of order event"
|
||||
logger.warn {channel:channel, message_id:message_id, key:key, previous: previous, count:count}, "out of order event"
|
||||
return "out-of-order"
|
||||
|
||||
_storeEventCount: (key, count) ->
|
||||
|
|
Loading…
Reference in a new issue