Merge pull request #7339 from overleaf/em-sentry-info

Send OError info to Sentry

GitOrigin-RevId: b89f2d86cf8b14d65cc38266b042bc72a4bb1922
This commit is contained in:
Eric Mc Sween 2022-04-07 07:54:38 -04:00 committed by Copybot
parent 97dca3de1c
commit b4e6b7215b

View file

@ -1,3 +1,4 @@
const OError = require('@overleaf/o-error')
const RATE_LIMIT_MAX_ERRORS = 5 const RATE_LIMIT_MAX_ERRORS = 5
const RATE_LIMIT_INTERVAL_MS = 60000 const RATE_LIMIT_INTERVAL_MS = 60000
@ -95,6 +96,9 @@ class SentryManager {
error = newError error = newError
} }
// OError integration
extra.info = OError.getFullInfo(error)
// filter paths from the message to avoid duplicate errors in sentry // filter paths from the message to avoid duplicate errors in sentry
// (e.g. errors from `fs` methods which have a path attribute) // (e.g. errors from `fs` methods which have a path attribute)
try { try {