Преглед изворни кода

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

Send OError info to Sentry

GitOrigin-RevId: b89f2d86cf8b14d65cc38266b042bc72a4bb1922
Eric Mc Sween пре 4 година
родитељ
комит
b4e6b7215b
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      libraries/logger/sentry-manager.js

+ 4 - 0
libraries/logger/sentry-manager.js

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