mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
remove sentry from backend services (#20752)
* remove sentry from backend services - no longer required * Remove Sentry integration from logging manager * Remove Sentry from clsi default settings * Remove `initializeErrorReporting` in libraries/logger * Remove `@sentry/node` from `libraries/logger` --------- Co-authored-by: Antoine Clausse <antoine.clausse@overleaf.com> GitOrigin-RevId: 8149a885f5258804b93ae39cde7b7333e992532a
This commit is contained in:
committed by
Copybot
co-authored by
Antoine Clausse
parent
3d0f5188ae
commit
6672372828
@@ -1,7 +1,6 @@
|
|||||||
const Stream = require('node:stream')
|
const Stream = require('node:stream')
|
||||||
const bunyan = require('bunyan')
|
const bunyan = require('bunyan')
|
||||||
const GCPManager = require('./gcp-manager')
|
const GCPManager = require('./gcp-manager')
|
||||||
const SentryManager = require('./sentry-manager')
|
|
||||||
const Serializers = require('./serializers')
|
const Serializers = require('./serializers')
|
||||||
const {
|
const {
|
||||||
FileLogLevelChecker,
|
FileLogLevelChecker,
|
||||||
@@ -33,10 +32,6 @@ const LoggingManager = {
|
|||||||
return this
|
return this
|
||||||
},
|
},
|
||||||
|
|
||||||
initializeErrorReporting(dsn, options) {
|
|
||||||
this.sentryManager = new SentryManager()
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Record<string, any>|string} attributes - Attributes to log (nice serialization for err, req, res)
|
* @param {Record<string, any>|string} attributes - Attributes to log (nice serialization for err, req, res)
|
||||||
* @param {string} [message] - Optional message
|
* @param {string} [message] - Optional message
|
||||||
@@ -68,9 +63,6 @@ const LoggingManager = {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.logger.error(attributes, message, ...Array.from(args))
|
this.logger.error(attributes, message, ...Array.from(args))
|
||||||
if (this.sentryManager) {
|
|
||||||
this.sentryManager.captureExceptionRateLimited(attributes, message)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -98,9 +90,6 @@ const LoggingManager = {
|
|||||||
*/
|
*/
|
||||||
fatal(attributes, message) {
|
fatal(attributes, message) {
|
||||||
this.logger.fatal(attributes, message)
|
this.logger.fatal(attributes, message)
|
||||||
if (this.sentryManager) {
|
|
||||||
this.sentryManager.captureException(attributes, message, 'fatal')
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_getOutputStreamConfig() {
|
_getOutputStreamConfig() {
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
"@google-cloud/logging-bunyan": "^5.1.0",
|
"@google-cloud/logging-bunyan": "^5.1.0",
|
||||||
"@overleaf/fetch-utils": "*",
|
"@overleaf/fetch-utils": "*",
|
||||||
"@overleaf/o-error": "*",
|
"@overleaf/o-error": "*",
|
||||||
"@sentry/node": "^6.13.2",
|
|
||||||
"bunyan": "^1.8.14"
|
"bunyan": "^1.8.14"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -1,106 +0,0 @@
|
|||||||
const Serializers = require('./serializers')
|
|
||||||
const RATE_LIMIT_MAX_ERRORS = 5
|
|
||||||
const RATE_LIMIT_INTERVAL_MS = 60000
|
|
||||||
|
|
||||||
class SentryManager {
|
|
||||||
constructor(dsn, options) {
|
|
||||||
this.Sentry = require('@sentry/node')
|
|
||||||
this.Sentry.init({ dsn, ...options })
|
|
||||||
// for rate limiting on sentry reporting
|
|
||||||
this.lastErrorTimeStamp = 0
|
|
||||||
this.lastErrorCount = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
captureExceptionRateLimited(attributes, message) {
|
|
||||||
const now = Date.now()
|
|
||||||
// have we recently reported an error?
|
|
||||||
const recentSentryReport =
|
|
||||||
now - this.lastErrorTimeStamp < RATE_LIMIT_INTERVAL_MS
|
|
||||||
// if so, increment the error count
|
|
||||||
if (recentSentryReport) {
|
|
||||||
this.lastErrorCount++
|
|
||||||
} else {
|
|
||||||
this.lastErrorCount = 0
|
|
||||||
this.lastErrorTimeStamp = now
|
|
||||||
}
|
|
||||||
// only report 5 errors every minute to avoid overload
|
|
||||||
if (this.lastErrorCount < RATE_LIMIT_MAX_ERRORS) {
|
|
||||||
// add a note if the rate limit has been hit
|
|
||||||
const note =
|
|
||||||
this.lastErrorCount + 1 === RATE_LIMIT_MAX_ERRORS
|
|
||||||
? '(rate limited)'
|
|
||||||
: ''
|
|
||||||
// report the exception
|
|
||||||
this.captureException(attributes, message, `error${note}`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
captureException(attributes, message, level) {
|
|
||||||
// handle case of logger.error "message"
|
|
||||||
if (typeof attributes === 'string') {
|
|
||||||
attributes = { err: new Error(attributes) }
|
|
||||||
}
|
|
||||||
|
|
||||||
// extract any error object
|
|
||||||
let error = Serializers.err(attributes.err || attributes.error)
|
|
||||||
|
|
||||||
// avoid reporting errors twice
|
|
||||||
for (const key in attributes) {
|
|
||||||
const value = attributes[key]
|
|
||||||
if (value instanceof Error && value.reportedToSentry) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// include our log message in the error report
|
|
||||||
if (error == null) {
|
|
||||||
if (typeof message === 'string') {
|
|
||||||
error = { message }
|
|
||||||
}
|
|
||||||
} else if (message != null) {
|
|
||||||
attributes.description = message
|
|
||||||
}
|
|
||||||
|
|
||||||
// report the error
|
|
||||||
if (error != null) {
|
|
||||||
// capture attributes and use *_id objects as tags
|
|
||||||
const tags = {}
|
|
||||||
const extra = {}
|
|
||||||
for (const key in attributes) {
|
|
||||||
let value = attributes[key]
|
|
||||||
if (Serializers[key]) {
|
|
||||||
value = Serializers[key](value)
|
|
||||||
}
|
|
||||||
if (key.match(/_id/) && typeof value === 'string') {
|
|
||||||
tags[key] = value
|
|
||||||
}
|
|
||||||
extra[key] = value
|
|
||||||
}
|
|
||||||
|
|
||||||
// OError integration
|
|
||||||
extra.info = error.info
|
|
||||||
delete error.info
|
|
||||||
|
|
||||||
// Sentry wants to receive an Error instance.
|
|
||||||
const errInstance = new Error(error.message)
|
|
||||||
Object.assign(errInstance, error)
|
|
||||||
|
|
||||||
try {
|
|
||||||
// send the error to sentry
|
|
||||||
this.Sentry.captureException(errInstance, { tags, extra, level })
|
|
||||||
|
|
||||||
// put a flag on the errors to avoid reporting them multiple times
|
|
||||||
for (const key in attributes) {
|
|
||||||
const value = attributes[key]
|
|
||||||
if (value instanceof Error) {
|
|
||||||
value.reportedToSentry = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (err) {
|
|
||||||
// ignore Sentry errors
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = SentryManager
|
|
||||||
@@ -43,20 +43,14 @@ describe('LoggingManager', function () {
|
|||||||
.stub()
|
.stub()
|
||||||
.returns(this.GCEMetadataLogLevelChecker),
|
.returns(this.GCEMetadataLogLevelChecker),
|
||||||
}
|
}
|
||||||
this.SentryManager = {
|
|
||||||
captureException: sinon.stub(),
|
|
||||||
captureExceptionRateLimited: sinon.stub(),
|
|
||||||
}
|
|
||||||
this.LoggingManager = SandboxedModule.require(MODULE_PATH, {
|
this.LoggingManager = SandboxedModule.require(MODULE_PATH, {
|
||||||
requires: {
|
requires: {
|
||||||
bunyan: this.Bunyan,
|
bunyan: this.Bunyan,
|
||||||
'./log-level-checker': this.LogLevelChecker,
|
'./log-level-checker': this.LogLevelChecker,
|
||||||
'./sentry-manager': sinon.stub().returns(this.SentryManager),
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
this.loggerName = 'test'
|
this.loggerName = 'test'
|
||||||
this.logger = this.LoggingManager.initialize(this.loggerName)
|
this.logger = this.LoggingManager.initialize(this.loggerName)
|
||||||
this.logger.initializeErrorReporting('test_dsn')
|
|
||||||
})
|
})
|
||||||
|
|
||||||
afterEach(function () {
|
afterEach(function () {
|
||||||
@@ -160,13 +154,6 @@ describe('LoggingManager', function () {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('logger.error', function () {
|
|
||||||
it('should report errors to Sentry', function () {
|
|
||||||
this.logger.error({ foo: 'bar' }, 'message')
|
|
||||||
expect(this.SentryManager.captureExceptionRateLimited).to.have.been.called
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('ringbuffer', function () {
|
describe('ringbuffer', function () {
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
this.logBufferMock = [
|
this.logBufferMock = [
|
||||||
|
|||||||
@@ -1,247 +0,0 @@
|
|||||||
const Path = require('node:path')
|
|
||||||
const SandboxedModule = require('sandboxed-module')
|
|
||||||
const { expect } = require('chai')
|
|
||||||
const sinon = require('sinon')
|
|
||||||
|
|
||||||
const MODULE_PATH = Path.join(__dirname, '../../sentry-manager.js')
|
|
||||||
|
|
||||||
describe('SentryManager', function () {
|
|
||||||
beforeEach(function () {
|
|
||||||
this.clock = sinon.useFakeTimers(Date.now())
|
|
||||||
this.Sentry = {
|
|
||||||
init: sinon.stub(),
|
|
||||||
captureException: sinon.stub(),
|
|
||||||
}
|
|
||||||
this.SentryManager = SandboxedModule.require(MODULE_PATH, {
|
|
||||||
requires: {
|
|
||||||
'@sentry/node': this.Sentry,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
this.sentryManager = new this.SentryManager('test_dsn')
|
|
||||||
})
|
|
||||||
|
|
||||||
afterEach(function () {
|
|
||||||
this.clock.restore()
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('captureExceptionRateLimited', function () {
|
|
||||||
it('should report a single error to sentry', function () {
|
|
||||||
this.sentryManager.captureExceptionRateLimited({ foo: 'bar' }, 'message')
|
|
||||||
expect(this.Sentry.captureException).to.have.been.calledOnce
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should report the same error to sentry only once', function () {
|
|
||||||
const error1 = new Error('this is the error')
|
|
||||||
this.sentryManager.captureExceptionRateLimited(
|
|
||||||
{ foo: error1 },
|
|
||||||
'first message'
|
|
||||||
)
|
|
||||||
this.sentryManager.captureExceptionRateLimited(
|
|
||||||
{ bar: error1 },
|
|
||||||
'second message'
|
|
||||||
)
|
|
||||||
expect(this.Sentry.captureException).to.have.been.calledOnce
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should report two different errors to sentry individually', function () {
|
|
||||||
const error1 = new Error('this is the error')
|
|
||||||
const error2 = new Error('this is the error')
|
|
||||||
this.sentryManager.captureExceptionRateLimited(
|
|
||||||
{ foo: error1 },
|
|
||||||
'first message'
|
|
||||||
)
|
|
||||||
this.sentryManager.captureExceptionRateLimited(
|
|
||||||
{ bar: error2 },
|
|
||||||
'second message'
|
|
||||||
)
|
|
||||||
expect(this.Sentry.captureException).to.have.been.calledTwice
|
|
||||||
})
|
|
||||||
|
|
||||||
it('for multiple errors should only report a maximum of 5 errors to sentry', function () {
|
|
||||||
for (let i = 0; i < 10; i++) {
|
|
||||||
this.sentryManager.captureExceptionRateLimited(
|
|
||||||
{ foo: 'bar' },
|
|
||||||
'message'
|
|
||||||
)
|
|
||||||
}
|
|
||||||
expect(this.Sentry.captureException).to.have.callCount(5)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('for multiple errors with a minute delay should report 10 errors to sentry', function () {
|
|
||||||
for (let i = 0; i < 10; i++) {
|
|
||||||
this.sentryManager.captureExceptionRateLimited(
|
|
||||||
{ foo: 'bar' },
|
|
||||||
'message'
|
|
||||||
)
|
|
||||||
}
|
|
||||||
expect(this.Sentry.captureException).to.have.callCount(5)
|
|
||||||
|
|
||||||
// allow a minute to pass
|
|
||||||
this.clock.tick(61 * 1000)
|
|
||||||
|
|
||||||
for (let i = 0; i < 10; i++) {
|
|
||||||
this.sentryManager.captureExceptionRateLimited(
|
|
||||||
{ foo: 'bar' },
|
|
||||||
'message'
|
|
||||||
)
|
|
||||||
}
|
|
||||||
expect(this.Sentry.captureException).to.have.callCount(10)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('captureException', function () {
|
|
||||||
it('should remove the path from fs errors', function () {
|
|
||||||
const fsError = new Error(
|
|
||||||
"Error: ENOENT: no such file or directory, stat '/tmp/3279b8d0-da10-11e8-8255-efd98985942b'"
|
|
||||||
)
|
|
||||||
fsError.path = '/tmp/3279b8d0-da10-11e8-8255-efd98985942b'
|
|
||||||
this.sentryManager.captureException({ err: fsError }, 'message', 'error')
|
|
||||||
expect(this.Sentry.captureException).to.have.been.calledWith(
|
|
||||||
sinon.match.has(
|
|
||||||
'message',
|
|
||||||
'Error: ENOENT: no such file or directory, stat'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should sanitize error', function () {
|
|
||||||
const err = {
|
|
||||||
name: 'CustomError',
|
|
||||||
message: 'hello',
|
|
||||||
_oErrorTags: [{ stack: 'here:1', info: { one: 1 } }],
|
|
||||||
stack: 'here:0',
|
|
||||||
info: { key: 'value' },
|
|
||||||
code: 42,
|
|
||||||
signal: 9,
|
|
||||||
path: '/foo',
|
|
||||||
}
|
|
||||||
this.sentryManager.captureException({ err }, 'message', 'error')
|
|
||||||
const expectedErr = {
|
|
||||||
name: 'CustomError',
|
|
||||||
message: 'hello',
|
|
||||||
stack: 'here:0\nhere:1',
|
|
||||||
code: 42,
|
|
||||||
signal: 9,
|
|
||||||
path: '/foo',
|
|
||||||
}
|
|
||||||
expect(this.Sentry.captureException).to.have.been.calledWith(
|
|
||||||
sinon.match(expectedErr),
|
|
||||||
sinon.match({
|
|
||||||
tags: sinon.match.any,
|
|
||||||
level: sinon.match.any,
|
|
||||||
extra: {
|
|
||||||
description: 'message',
|
|
||||||
info: sinon.match({
|
|
||||||
one: 1,
|
|
||||||
key: 'value',
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
})
|
|
||||||
)
|
|
||||||
// Chai is very picky with comparing Error instances. Go the long way of comparing all the fields manually.
|
|
||||||
const gotErr = this.Sentry.captureException.args[0][0]
|
|
||||||
for (const [key, wanted] of Object.entries(expectedErr)) {
|
|
||||||
expect(gotErr).to.have.property(key, wanted)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
it('should sanitize request', function () {
|
|
||||||
const req = {
|
|
||||||
ip: '1.2.3.4',
|
|
||||||
method: 'GET',
|
|
||||||
url: '/foo',
|
|
||||||
headers: {
|
|
||||||
referer: 'abc',
|
|
||||||
'content-length': 1337,
|
|
||||||
'user-agent': 'curl',
|
|
||||||
authorization: '42',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
this.sentryManager.captureException({ req }, 'message', 'error')
|
|
||||||
const expectedReq = {
|
|
||||||
remoteAddress: '1.2.3.4',
|
|
||||||
method: 'GET',
|
|
||||||
url: '/foo',
|
|
||||||
headers: {
|
|
||||||
referer: 'abc',
|
|
||||||
'content-length': 1337,
|
|
||||||
'user-agent': 'curl',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
expect(this.Sentry.captureException).to.have.been.calledWith(
|
|
||||||
sinon.match({
|
|
||||||
message: 'message',
|
|
||||||
}),
|
|
||||||
sinon.match({
|
|
||||||
tags: sinon.match.any,
|
|
||||||
level: sinon.match.any,
|
|
||||||
extra: {
|
|
||||||
info: sinon.match.any,
|
|
||||||
req: expectedReq,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
)
|
|
||||||
expect(this.Sentry.captureException.args[0][1].extra.req).to.deep.equal(
|
|
||||||
expectedReq
|
|
||||||
)
|
|
||||||
})
|
|
||||||
it('should sanitize response', function () {
|
|
||||||
const res = {
|
|
||||||
statusCode: 417,
|
|
||||||
body: Buffer.from('foo'),
|
|
||||||
getHeader(key) {
|
|
||||||
expect(key).to.be.oneOf(['content-length'])
|
|
||||||
if (key === 'content-length') return 1337
|
|
||||||
},
|
|
||||||
}
|
|
||||||
this.sentryManager.captureException({ res }, 'message', 'error')
|
|
||||||
const expectedRes = {
|
|
||||||
statusCode: 417,
|
|
||||||
headers: {
|
|
||||||
'content-length': 1337,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
expect(this.Sentry.captureException).to.have.been.calledWith(
|
|
||||||
sinon.match({
|
|
||||||
message: 'message',
|
|
||||||
}),
|
|
||||||
sinon.match({
|
|
||||||
tags: sinon.match.any,
|
|
||||||
level: sinon.match.any,
|
|
||||||
extra: {
|
|
||||||
info: sinon.match.any,
|
|
||||||
res: expectedRes,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
)
|
|
||||||
expect(this.Sentry.captureException.args[0][1].extra.res).to.deep.equal(
|
|
||||||
expectedRes
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('reportedToSentry', function () {
|
|
||||||
it('should mark the error as reported to sentry', function () {
|
|
||||||
const err = new Error()
|
|
||||||
this.sentryManager.captureException({ err }, 'message')
|
|
||||||
expect(this.Sentry.captureException).to.have.been.called
|
|
||||||
expect(err.reportedToSentry).to.equal(true)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should mark two errors as reported to sentry', function () {
|
|
||||||
const err1 = new Error()
|
|
||||||
const err2 = new Error()
|
|
||||||
this.sentryManager.captureException({ err: err1, err2 }, 'message')
|
|
||||||
expect(this.Sentry.captureException).to.have.been.called
|
|
||||||
expect(err1.reportedToSentry).to.equal(true)
|
|
||||||
expect(err2.reportedToSentry).to.equal(true)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should not mark arbitrary objects as reported to sentry', function () {
|
|
||||||
const err = new Error()
|
|
||||||
const ctx = { foo: 'bar' }
|
|
||||||
this.sentryManager.captureException({ err, ctx }, 'message')
|
|
||||||
expect(this.Sentry.captureException).to.have.been.called
|
|
||||||
expect(ctx.reportedToSentry).not.to.exist
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
Generated
-266
@@ -186,7 +186,6 @@
|
|||||||
"@google-cloud/logging-bunyan": "^5.1.0",
|
"@google-cloud/logging-bunyan": "^5.1.0",
|
||||||
"@overleaf/fetch-utils": "*",
|
"@overleaf/fetch-utils": "*",
|
||||||
"@overleaf/o-error": "*",
|
"@overleaf/o-error": "*",
|
||||||
"@sentry/node": "^6.13.2",
|
|
||||||
"bunyan": "^1.8.14"
|
"bunyan": "^1.8.14"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -8879,94 +8878,6 @@
|
|||||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
|
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@sentry/core": {
|
|
||||||
"version": "6.17.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-6.17.3.tgz",
|
|
||||||
"integrity": "sha512-h7WgrNL0RVlr8Dceh97ZiXNdmEumDutpoqFijjiX4x72IiC6zSaVD4IsqrdGln+v8iJ3l3lX44HHqzubDub1OQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"@sentry/hub": "6.17.3",
|
|
||||||
"@sentry/minimal": "6.17.3",
|
|
||||||
"@sentry/types": "6.17.3",
|
|
||||||
"@sentry/utils": "6.17.3",
|
|
||||||
"tslib": "^1.9.3"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@sentry/core/node_modules/tslib": {
|
|
||||||
"version": "1.14.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
|
||||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
|
|
||||||
},
|
|
||||||
"node_modules/@sentry/hub": {
|
|
||||||
"version": "6.17.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-6.17.3.tgz",
|
|
||||||
"integrity": "sha512-TDxv8nRvk45xvfQg6zs8GYzQzgo0EMhI3wjQZLiNfW2rzybKmIwVp2x3O4PAc3WPzwg4bYNgSAkYKVlHmYjRCg==",
|
|
||||||
"dependencies": {
|
|
||||||
"@sentry/types": "6.17.3",
|
|
||||||
"@sentry/utils": "6.17.3",
|
|
||||||
"tslib": "^1.9.3"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@sentry/hub/node_modules/tslib": {
|
|
||||||
"version": "1.14.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
|
||||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
|
|
||||||
},
|
|
||||||
"node_modules/@sentry/minimal": {
|
|
||||||
"version": "6.17.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-6.17.3.tgz",
|
|
||||||
"integrity": "sha512-zvGGfHNNA92Lqx6P8ZwOUkmRmAiQl0AQFRXl9So1Ayq9bJRnFLJZv4YFVnp2wE4HXYIlfBYb51+GlGB5LIuPmw==",
|
|
||||||
"dependencies": {
|
|
||||||
"@sentry/hub": "6.17.3",
|
|
||||||
"@sentry/types": "6.17.3",
|
|
||||||
"tslib": "^1.9.3"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@sentry/minimal/node_modules/tslib": {
|
|
||||||
"version": "1.14.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
|
||||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
|
|
||||||
},
|
|
||||||
"node_modules/@sentry/node": {
|
|
||||||
"version": "6.17.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/node/-/node-6.17.3.tgz",
|
|
||||||
"integrity": "sha512-LvpB6bCQTytoOlrcQgR80aeEEBi2Sm1hNf+VvoPT6CW7tKI1/6pMWXaNnRu2dpyWS/j6tooz8rd/3dl1SZoGvg==",
|
|
||||||
"dependencies": {
|
|
||||||
"@sentry/core": "6.17.3",
|
|
||||||
"@sentry/hub": "6.17.3",
|
|
||||||
"@sentry/tracing": "6.17.3",
|
|
||||||
"@sentry/types": "6.17.3",
|
|
||||||
"@sentry/utils": "6.17.3",
|
|
||||||
"cookie": "^0.4.1",
|
|
||||||
"https-proxy-agent": "^5.0.0",
|
|
||||||
"lru_map": "^0.3.3",
|
|
||||||
"tslib": "^1.9.3"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@sentry/node/node_modules/cookie": {
|
|
||||||
"version": "0.4.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz",
|
|
||||||
"integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 0.6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@sentry/node/node_modules/tslib": {
|
|
||||||
"version": "1.14.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
|
||||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
|
|
||||||
},
|
|
||||||
"node_modules/@sentry/replay": {
|
"node_modules/@sentry/replay": {
|
||||||
"version": "7.46.0",
|
"version": "7.46.0",
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-7.46.0.tgz",
|
"resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-7.46.0.tgz",
|
||||||
@@ -9023,51 +8934,6 @@
|
|||||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
|
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@sentry/tracing": {
|
|
||||||
"version": "6.17.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-6.17.3.tgz",
|
|
||||||
"integrity": "sha512-GnHugxw5qkWwYmeQbbrswuWpb0bpYqyJr/dO25QQOCwp+cckQrvBYTMC8zGJG10u94O4el0lQaQnNFz9WF3r6g==",
|
|
||||||
"dependencies": {
|
|
||||||
"@sentry/hub": "6.17.3",
|
|
||||||
"@sentry/minimal": "6.17.3",
|
|
||||||
"@sentry/types": "6.17.3",
|
|
||||||
"@sentry/utils": "6.17.3",
|
|
||||||
"tslib": "^1.9.3"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@sentry/tracing/node_modules/tslib": {
|
|
||||||
"version": "1.14.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
|
||||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
|
|
||||||
},
|
|
||||||
"node_modules/@sentry/types": {
|
|
||||||
"version": "6.17.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-6.17.3.tgz",
|
|
||||||
"integrity": "sha512-0AXCjYcfl8Vx26GfyLY4rBQ78Lyt1oND3UozTTMaVXlcKYIjzV+f7TOo5IZx+Kbr6EGUNDLdpA4xfbkWdW/1NA==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@sentry/utils": {
|
|
||||||
"version": "6.17.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-6.17.3.tgz",
|
|
||||||
"integrity": "sha512-6/2awDIeHSj0JgiC7DDdV1lxvLmf+/BisWhw09dKvmhVQB3ADvQZbohjUgM+Qam5zE0xmZAfQhvuDwC41W8Wnw==",
|
|
||||||
"dependencies": {
|
|
||||||
"@sentry/types": "6.17.3",
|
|
||||||
"tslib": "^1.9.3"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@sentry/utils/node_modules/tslib": {
|
|
||||||
"version": "1.14.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
|
||||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
|
|
||||||
},
|
|
||||||
"node_modules/@sideway/address": {
|
"node_modules/@sideway/address": {
|
||||||
"version": "4.1.4",
|
"version": "4.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz",
|
||||||
@@ -26301,11 +26167,6 @@
|
|||||||
"tslib": "^2.0.3"
|
"tslib": "^2.0.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/lru_map": {
|
|
||||||
"version": "0.3.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz",
|
|
||||||
"integrity": "sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0="
|
|
||||||
},
|
|
||||||
"node_modules/lru-cache": {
|
"node_modules/lru-cache": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
|
||||||
@@ -50296,7 +50157,6 @@
|
|||||||
"@google-cloud/logging-bunyan": "^5.1.0",
|
"@google-cloud/logging-bunyan": "^5.1.0",
|
||||||
"@overleaf/fetch-utils": "*",
|
"@overleaf/fetch-utils": "*",
|
||||||
"@overleaf/o-error": "*",
|
"@overleaf/o-error": "*",
|
||||||
"@sentry/node": "^6.13.2",
|
|
||||||
"bunyan": "^1.8.14",
|
"bunyan": "^1.8.14",
|
||||||
"chai": "^4.3.6",
|
"chai": "^4.3.6",
|
||||||
"mocha": "^10.2.0",
|
"mocha": "^10.2.0",
|
||||||
@@ -53504,87 +53364,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@sentry/core": {
|
|
||||||
"version": "6.17.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-6.17.3.tgz",
|
|
||||||
"integrity": "sha512-h7WgrNL0RVlr8Dceh97ZiXNdmEumDutpoqFijjiX4x72IiC6zSaVD4IsqrdGln+v8iJ3l3lX44HHqzubDub1OQ==",
|
|
||||||
"requires": {
|
|
||||||
"@sentry/hub": "6.17.3",
|
|
||||||
"@sentry/minimal": "6.17.3",
|
|
||||||
"@sentry/types": "6.17.3",
|
|
||||||
"@sentry/utils": "6.17.3",
|
|
||||||
"tslib": "^1.9.3"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": {
|
|
||||||
"version": "1.14.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
|
||||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@sentry/hub": {
|
|
||||||
"version": "6.17.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-6.17.3.tgz",
|
|
||||||
"integrity": "sha512-TDxv8nRvk45xvfQg6zs8GYzQzgo0EMhI3wjQZLiNfW2rzybKmIwVp2x3O4PAc3WPzwg4bYNgSAkYKVlHmYjRCg==",
|
|
||||||
"requires": {
|
|
||||||
"@sentry/types": "6.17.3",
|
|
||||||
"@sentry/utils": "6.17.3",
|
|
||||||
"tslib": "^1.9.3"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": {
|
|
||||||
"version": "1.14.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
|
||||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@sentry/minimal": {
|
|
||||||
"version": "6.17.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-6.17.3.tgz",
|
|
||||||
"integrity": "sha512-zvGGfHNNA92Lqx6P8ZwOUkmRmAiQl0AQFRXl9So1Ayq9bJRnFLJZv4YFVnp2wE4HXYIlfBYb51+GlGB5LIuPmw==",
|
|
||||||
"requires": {
|
|
||||||
"@sentry/hub": "6.17.3",
|
|
||||||
"@sentry/types": "6.17.3",
|
|
||||||
"tslib": "^1.9.3"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": {
|
|
||||||
"version": "1.14.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
|
||||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@sentry/node": {
|
|
||||||
"version": "6.17.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/node/-/node-6.17.3.tgz",
|
|
||||||
"integrity": "sha512-LvpB6bCQTytoOlrcQgR80aeEEBi2Sm1hNf+VvoPT6CW7tKI1/6pMWXaNnRu2dpyWS/j6tooz8rd/3dl1SZoGvg==",
|
|
||||||
"requires": {
|
|
||||||
"@sentry/core": "6.17.3",
|
|
||||||
"@sentry/hub": "6.17.3",
|
|
||||||
"@sentry/tracing": "6.17.3",
|
|
||||||
"@sentry/types": "6.17.3",
|
|
||||||
"@sentry/utils": "6.17.3",
|
|
||||||
"cookie": "^0.4.1",
|
|
||||||
"https-proxy-agent": "^5.0.0",
|
|
||||||
"lru_map": "^0.3.3",
|
|
||||||
"tslib": "^1.9.3"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"cookie": {
|
|
||||||
"version": "0.4.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz",
|
|
||||||
"integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA=="
|
|
||||||
},
|
|
||||||
"tslib": {
|
|
||||||
"version": "1.14.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
|
||||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@sentry/replay": {
|
"@sentry/replay": {
|
||||||
"version": "7.46.0",
|
"version": "7.46.0",
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-7.46.0.tgz",
|
"resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-7.46.0.tgz",
|
||||||
@@ -53631,46 +53410,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@sentry/tracing": {
|
|
||||||
"version": "6.17.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-6.17.3.tgz",
|
|
||||||
"integrity": "sha512-GnHugxw5qkWwYmeQbbrswuWpb0bpYqyJr/dO25QQOCwp+cckQrvBYTMC8zGJG10u94O4el0lQaQnNFz9WF3r6g==",
|
|
||||||
"requires": {
|
|
||||||
"@sentry/hub": "6.17.3",
|
|
||||||
"@sentry/minimal": "6.17.3",
|
|
||||||
"@sentry/types": "6.17.3",
|
|
||||||
"@sentry/utils": "6.17.3",
|
|
||||||
"tslib": "^1.9.3"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": {
|
|
||||||
"version": "1.14.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
|
||||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@sentry/types": {
|
|
||||||
"version": "6.17.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-6.17.3.tgz",
|
|
||||||
"integrity": "sha512-0AXCjYcfl8Vx26GfyLY4rBQ78Lyt1oND3UozTTMaVXlcKYIjzV+f7TOo5IZx+Kbr6EGUNDLdpA4xfbkWdW/1NA=="
|
|
||||||
},
|
|
||||||
"@sentry/utils": {
|
|
||||||
"version": "6.17.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-6.17.3.tgz",
|
|
||||||
"integrity": "sha512-6/2awDIeHSj0JgiC7DDdV1lxvLmf+/BisWhw09dKvmhVQB3ADvQZbohjUgM+Qam5zE0xmZAfQhvuDwC41W8Wnw==",
|
|
||||||
"requires": {
|
|
||||||
"@sentry/types": "6.17.3",
|
|
||||||
"tslib": "^1.9.3"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": {
|
|
||||||
"version": "1.14.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
|
||||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@sideway/address": {
|
"@sideway/address": {
|
||||||
"version": "4.1.4",
|
"version": "4.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz",
|
||||||
@@ -67593,11 +67332,6 @@
|
|||||||
"tslib": "^2.0.3"
|
"tslib": "^2.0.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lru_map": {
|
|
||||||
"version": "0.3.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz",
|
|
||||||
"integrity": "sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0="
|
|
||||||
},
|
|
||||||
"lru-cache": {
|
"lru-cache": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ The CLSI can be configured through the following environment variables:
|
|||||||
* `FILESTORE_PARALLEL_FILE_DOWNLOADS` - Number of parallel file downloads
|
* `FILESTORE_PARALLEL_FILE_DOWNLOADS` - Number of parallel file downloads
|
||||||
* `LISTEN_ADDRESS` - The address for the RESTful service to listen on. Set to `0.0.0.0` to listen on all network interfaces
|
* `LISTEN_ADDRESS` - The address for the RESTful service to listen on. Set to `0.0.0.0` to listen on all network interfaces
|
||||||
* `PROCESS_LIFE_SPAN_LIMIT_MS` - Process life span limit in milliseconds
|
* `PROCESS_LIFE_SPAN_LIMIT_MS` - Process life span limit in milliseconds
|
||||||
* `SENTRY_DSN` - Sentry [Data Source Name](https://docs.sentry.io/product/sentry-basics/dsn-explainer/)
|
|
||||||
* `SMOKE_TEST` - Whether to run smoke tests
|
* `SMOKE_TEST` - Whether to run smoke tests
|
||||||
* `TEXLIVE_IMAGE` - The TeX Live Docker image to use for sibling containers, e.g. `gcr.io/overleaf-ops/texlive-full:2017.1`
|
* `TEXLIVE_IMAGE` - The TeX Live Docker image to use for sibling containers, e.g. `gcr.io/overleaf-ops/texlive-full:2017.1`
|
||||||
* `TEX_LIVE_IMAGE_NAME_OVERRIDE` - The name of the registry for the Docker image e.g. `gcr.io/overleaf-ops`
|
* `TEX_LIVE_IMAGE_NAME_OVERRIDE` - The name of the registry for the Docker image e.g. `gcr.io/overleaf-ops`
|
||||||
|
|||||||
@@ -6,9 +6,6 @@ const ContentController = require('./app/js/ContentController')
|
|||||||
const Settings = require('@overleaf/settings')
|
const Settings = require('@overleaf/settings')
|
||||||
const logger = require('@overleaf/logger')
|
const logger = require('@overleaf/logger')
|
||||||
logger.initialize('clsi')
|
logger.initialize('clsi')
|
||||||
if (Settings.sentry.dsn != null) {
|
|
||||||
logger.initializeErrorReporting(Settings.sentry.dsn)
|
|
||||||
}
|
|
||||||
const Metrics = require('@overleaf/metrics')
|
const Metrics = require('@overleaf/metrics')
|
||||||
|
|
||||||
const smokeTest = require('./test/smoke/js/SmokeTests')
|
const smokeTest = require('./test/smoke/js/SmokeTests')
|
||||||
|
|||||||
@@ -60,10 +60,6 @@ module.exports = {
|
|||||||
texliveImageNameOveride: process.env.TEX_LIVE_IMAGE_NAME_OVERRIDE,
|
texliveImageNameOveride: process.env.TEX_LIVE_IMAGE_NAME_OVERRIDE,
|
||||||
texliveOpenoutAny: process.env.TEXLIVE_OPENOUT_ANY,
|
texliveOpenoutAny: process.env.TEXLIVE_OPENOUT_ANY,
|
||||||
texliveMaxPrintLine: process.env.TEXLIVE_MAX_PRINT_LINE,
|
texliveMaxPrintLine: process.env.TEXLIVE_MAX_PRINT_LINE,
|
||||||
sentry: {
|
|
||||||
dsn: process.env.SENTRY_DSN,
|
|
||||||
},
|
|
||||||
|
|
||||||
enablePdfCaching: process.env.ENABLE_PDF_CACHING === 'true',
|
enablePdfCaching: process.env.ENABLE_PDF_CACHING === 'true',
|
||||||
enablePdfCachingDark: process.env.ENABLE_PDF_CACHING_DARK === 'true',
|
enablePdfCachingDark: process.env.ENABLE_PDF_CACHING_DARK === 'true',
|
||||||
pdfCachingMinChunkSize:
|
pdfCachingMinChunkSize:
|
||||||
|
|||||||
@@ -9,10 +9,6 @@ logger.initialize('document-updater')
|
|||||||
|
|
||||||
logger.logger.addSerializers(require('./app/js/LoggerSerializers'))
|
logger.logger.addSerializers(require('./app/js/LoggerSerializers'))
|
||||||
|
|
||||||
if (Settings.sentry != null && Settings.sentry.dsn != null) {
|
|
||||||
logger.initializeErrorReporting(Settings.sentry.dsn)
|
|
||||||
}
|
|
||||||
|
|
||||||
const RedisManager = require('./app/js/RedisManager')
|
const RedisManager = require('./app/js/RedisManager')
|
||||||
const DispatchManager = require('./app/js/DispatchManager')
|
const DispatchManager = require('./app/js/DispatchManager')
|
||||||
const DeleteQueueManager = require('./app/js/DeleteQueueManager')
|
const DeleteQueueManager = require('./app/js/DeleteQueueManager')
|
||||||
|
|||||||
@@ -176,10 +176,6 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
sentry: {
|
|
||||||
dsn: process.env.SENTRY_DSN,
|
|
||||||
},
|
|
||||||
|
|
||||||
publishOnIndividualChannels:
|
publishOnIndividualChannels:
|
||||||
process.env.PUBLISH_ON_INDIVIDUAL_CHANNELS === 'true',
|
process.env.PUBLISH_ON_INDIVIDUAL_CHANNELS === 'true',
|
||||||
|
|
||||||
|
|||||||
@@ -23,10 +23,6 @@ const app = express()
|
|||||||
|
|
||||||
app.use(RequestLogger.middleware)
|
app.use(RequestLogger.middleware)
|
||||||
|
|
||||||
if (settings.sentry && settings.sentry.dsn) {
|
|
||||||
logger.initializeErrorReporting(settings.sentry.dsn)
|
|
||||||
}
|
|
||||||
|
|
||||||
Metrics.open_sockets.monitor(true)
|
Metrics.open_sockets.monitor(true)
|
||||||
Metrics.memory.monitor(logger)
|
Metrics.memory.monitor(logger)
|
||||||
if (Metrics.event_loop) {
|
if (Metrics.event_loop) {
|
||||||
|
|||||||
@@ -99,10 +99,6 @@ const settings = {
|
|||||||
|
|
||||||
enableConversions: process.env.ENABLE_CONVERSIONS === 'true',
|
enableConversions: process.env.ENABLE_CONVERSIONS === 'true',
|
||||||
|
|
||||||
sentry: {
|
|
||||||
dsn: process.env.SENTRY_DSN,
|
|
||||||
},
|
|
||||||
|
|
||||||
gracefulShutdownDelayInMs:
|
gracefulShutdownDelayInMs:
|
||||||
parseInt(process.env.GRACEFUL_SHUTDOWN_DELAY_SECONDS ?? '30', 10) * 1000,
|
parseInt(process.env.GRACEFUL_SHUTDOWN_DELAY_SECONDS ?? '30', 10) * 1000,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import Settings from '@overleaf/settings'
|
|
||||||
import Metrics from '@overleaf/metrics'
|
import Metrics from '@overleaf/metrics'
|
||||||
import logger from '@overleaf/logger'
|
import logger from '@overleaf/logger'
|
||||||
import express from 'express'
|
import express from 'express'
|
||||||
@@ -9,10 +8,6 @@ import * as Validation from './Validation.js'
|
|||||||
|
|
||||||
const HistoryLogger = logger.initialize('project-history').logger
|
const HistoryLogger = logger.initialize('project-history').logger
|
||||||
|
|
||||||
if (Settings.sentry.dsn) {
|
|
||||||
logger.initializeErrorReporting(Settings.sentry.dsn)
|
|
||||||
}
|
|
||||||
|
|
||||||
Metrics.event_loop.monitor(logger)
|
Metrics.event_loop.monitor(logger)
|
||||||
Metrics.memory.monitor(logger)
|
Metrics.memory.monitor(logger)
|
||||||
Metrics.leaked_sockets.monitor(logger)
|
Metrics.leaked_sockets.monitor(logger)
|
||||||
|
|||||||
@@ -101,9 +101,5 @@ module.exports = {
|
|||||||
uploadFolder: process.env.UPLOAD_FOLDER || '/tmp/',
|
uploadFolder: process.env.UPLOAD_FOLDER || '/tmp/',
|
||||||
},
|
},
|
||||||
|
|
||||||
sentry: {
|
|
||||||
dsn: process.env.SENTRY_DSN,
|
|
||||||
},
|
|
||||||
|
|
||||||
maxFileSizeInBytes: 100 * 1024 * 1024, // 100 megabytes
|
maxFileSizeInBytes: 100 * 1024 * 1024, // 100 megabytes
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,9 +13,6 @@ Metrics.open_sockets.monitor()
|
|||||||
const express = require('express')
|
const express = require('express')
|
||||||
const session = require('express-session')
|
const session = require('express-session')
|
||||||
const redis = require('@overleaf/redis-wrapper')
|
const redis = require('@overleaf/redis-wrapper')
|
||||||
if (Settings.sentry && Settings.sentry.dsn) {
|
|
||||||
logger.initializeErrorReporting(Settings.sentry.dsn)
|
|
||||||
}
|
|
||||||
|
|
||||||
const sessionRedisClient = redis.createClient(Settings.redis.websessions)
|
const sessionRedisClient = redis.createClient(Settings.redis.websessions)
|
||||||
|
|
||||||
|
|||||||
@@ -162,10 +162,6 @@ const settings = {
|
|||||||
// the deployment colour for this app.
|
// the deployment colour for this app.
|
||||||
deploymentFile: process.env.DEPLOYMENT_FILE,
|
deploymentFile: process.env.DEPLOYMENT_FILE,
|
||||||
|
|
||||||
sentry: {
|
|
||||||
dsn: process.env.SENTRY_DSN,
|
|
||||||
},
|
|
||||||
|
|
||||||
errors: {
|
errors: {
|
||||||
catchUncaughtErrors: true,
|
catchUncaughtErrors: true,
|
||||||
shutdownOnUncaughtError: true,
|
shutdownOnUncaughtError: true,
|
||||||
|
|||||||
@@ -23,9 +23,6 @@ logger.logger.serializers.user = Serializers.user
|
|||||||
logger.logger.serializers.docs = Serializers.docs
|
logger.logger.serializers.docs = Serializers.docs
|
||||||
logger.logger.serializers.files = Serializers.files
|
logger.logger.serializers.files = Serializers.files
|
||||||
logger.logger.serializers.project = Serializers.project
|
logger.logger.serializers.project = Serializers.project
|
||||||
if (Settings.sentry?.dsn != null) {
|
|
||||||
logger.initializeErrorReporting(Settings.sentry.dsn)
|
|
||||||
}
|
|
||||||
http.globalAgent.keepAlive = false
|
http.globalAgent.keepAlive = false
|
||||||
http.globalAgent.maxSockets = Settings.limits.httpGlobalAgentMaxSockets
|
http.globalAgent.maxSockets = Settings.limits.httpGlobalAgentMaxSockets
|
||||||
https.globalAgent.keepAlive = false
|
https.globalAgent.keepAlive = false
|
||||||
|
|||||||
Reference in New Issue
Block a user