Merge pull request #5181 from overleaf/bg-upgrade-sentry-package-version

Migrate from raven to @sentry/node

GitOrigin-RevId: 1a82225b5204a9c507b566efff3c090b124e2392
This commit is contained in:
Brian Gough
2021-09-23 08:03:19 +00:00
committed by Copybot
parent 603698ed32
commit 08e0dcb85f
4 changed files with 1802 additions and 1497 deletions
@@ -25,9 +25,9 @@ describe('LoggingManager', function () {
level: sinon.stub(),
warn: sinon.stub()
}
this.ravenClient = {
captureException: this.captureException,
once: sinon.stub().yields()
this.Sentry = {
init: sinon.stub(),
captureException: this.captureException
}
this.fetchResponse = {
text: sinon.stub().resolves(''),
@@ -42,9 +42,6 @@ describe('LoggingManager', function () {
res: sinon.stub()
}
}
this.Raven = {
Client: sinon.stub().returns(this.ravenClient)
}
this.Fetch = sinon.stub().resolves(this.fetchResponse)
this.Fs = {
readFile: sinon.stub(),
@@ -63,7 +60,7 @@ describe('LoggingManager', function () {
globals: { console, process },
requires: {
bunyan: this.Bunyan,
raven: this.Raven,
'@sentry/node': this.Sentry,
'node-fetch': this.Fetch,
fs: this.Fs,
'@google-cloud/logging-bunyan': this.GCPLogging
@@ -452,7 +449,8 @@ describe('LoggingManager', function () {
this.fetchResponse.text = sinon
.stub()
.resolves((this.start + 1000).toString())
this.logger.getTracingEndTime = this.logger.getTracingEndTimeMetadata
this.logger.getTracingEndTime =
this.logger.getTracingEndTimeMetadata
await this.logger.checkLogLevel()
})
@@ -471,7 +469,8 @@ describe('LoggingManager', function () {
.stub()
.resolves((this.start + 1000).toString())
this.Fetch.fetch = sinon.stub().resolves(this.fetchResponse)
this.logger.getTracingEndTime = this.logger.getTracingEndTimeMetadata
this.logger.getTracingEndTime =
this.logger.getTracingEndTimeMetadata
await this.logger.checkLogLevel()
})