mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
allow options for count
This commit is contained in:
parent
53aa2490f5
commit
93df87eff3
1 changed files with 4 additions and 2 deletions
|
@ -83,9 +83,11 @@ module.exports = Metrics =
|
|||
if process.env['DEBUG_METRICS']
|
||||
console.log("doing inc", key, opts)
|
||||
|
||||
count : (key, count, sampleRate = 1)->
|
||||
count : (key, count, sampleRate = 1, opts = {})->
|
||||
key = Metrics.buildPromKey(key)
|
||||
prom.metric('counter', key).inc({app: appname, host: hostname}, count)
|
||||
opts.app = appname
|
||||
opts.host = hostname
|
||||
prom.metric('counter', key).inc(opts, count)
|
||||
if process.env['DEBUG_METRICS']
|
||||
console.log("doing count/inc", key, opts)
|
||||
|
||||
|
|
Loading…
Reference in a new issue