Merge pull request #157 from overleaf/jpa-download-failed-metric

[misc] add a metric for failing downloads
This commit is contained in:
Jakob Ackermann 2020-04-03 14:03:16 +02:00 committed by GitHub
commit bb9e8bb6f5
2 changed files with 2 additions and 0 deletions

View file

@ -324,6 +324,7 @@ module.exports = ResourceWriter = {
},
'error downloading file for resources'
)
Metrics.inc('download-failed')
}
return callback()
}

View file

@ -36,6 +36,7 @@ describe('ResourceWriter', function() {
'./OutputFileFinder': (this.OutputFileFinder = {}),
'logger-sharelatex': { log: sinon.stub(), err: sinon.stub() },
'./Metrics': (this.Metrics = {
inc: sinon.stub(),
Timer: (Timer = (function() {
Timer = class Timer {
static initClass() {