mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
[misc] EventLogger: drop explicit metrics.inc amount
The module has a hard-coded increment of 1, which is the only value the prometheus backend supports.
This commit is contained in:
parent
bd5e8b8f71
commit
b8fcb265b2
2 changed files with 4 additions and 4 deletions
|
@ -43,7 +43,7 @@ module.exports = EventLogger = {
|
|||
// store the last count in a hash for each host
|
||||
const previous = EventLogger._storeEventCount(key, count)
|
||||
if (!previous || count === previous + 1) {
|
||||
metrics.inc(`event.${channel}.valid`, 0.001) // downsample high rate docupdater events
|
||||
metrics.inc(`event.${channel}.valid`)
|
||||
return // order is ok
|
||||
}
|
||||
if (count === previous) {
|
||||
|
|
|
@ -55,7 +55,7 @@ describe('EventLogger', function () {
|
|||
|
||||
return it('should increment the valid event metric', function () {
|
||||
return this.metrics.inc
|
||||
.calledWith(`event.${this.channel}.valid`, 1)
|
||||
.calledWith(`event.${this.channel}.valid`)
|
||||
.should.equals(true)
|
||||
})
|
||||
})
|
||||
|
@ -80,7 +80,7 @@ describe('EventLogger', function () {
|
|||
|
||||
return it('should increment the duplicate event metric', function () {
|
||||
return this.metrics.inc
|
||||
.calledWith(`event.${this.channel}.duplicate`, 1)
|
||||
.calledWith(`event.${this.channel}.duplicate`)
|
||||
.should.equals(true)
|
||||
})
|
||||
})
|
||||
|
@ -110,7 +110,7 @@ describe('EventLogger', function () {
|
|||
|
||||
return it('should increment the out-of-order event metric', function () {
|
||||
return this.metrics.inc
|
||||
.calledWith(`event.${this.channel}.out-of-order`, 1)
|
||||
.calledWith(`event.${this.channel}.out-of-order`)
|
||||
.should.equals(true)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue