|
7 | 7 |
|
8 | 8 | import tornado.web
|
9 | 9 | import tornado.iostream
|
10 |
| -from raven.contrib.tornado import SentryMixin |
| 10 | +import sentry_sdk |
11 | 11 |
|
12 | 12 | import waterbutler.core.utils
|
13 | 13 | import waterbutler.server.utils
|
@@ -76,7 +76,7 @@ def options(self):
|
76 | 76 | self.set_header('Access-Control-Allow-Methods', 'GET, PUT, POST, DELETE'),
|
77 | 77 |
|
78 | 78 |
|
79 |
| -class BaseHandler(CorsMixin, tornado.web.RequestHandler, SentryMixin): |
| 79 | +class BaseHandler(CorsMixin, tornado.web.RequestHandler): |
80 | 80 | """Base class for the Render and Export handlers. Fetches the file metadata for the file
|
81 | 81 | indicated by the ``url`` query parameter and builds the provider caches. Also handles
|
82 | 82 | writing output and errors.
|
@@ -159,8 +159,11 @@ async def write_stream(self, stream):
|
159 | 159 | return
|
160 | 160 |
|
161 | 161 | def write_error(self, status_code, exc_info):
|
162 |
| - self.captureException(exc_info) # Log all non 2XX codes to sentry |
163 | 162 | etype, exc, _ = exc_info
|
| 163 | + scope = sentry_sdk.get_current_scope() |
| 164 | + scope.set_tag('class', etype.__name_) |
| 165 | + scope.set_tag('status_code', status_code) |
| 166 | + sentry_sdk.capture_exception(exc) # Log all non 2XX codes to sentry |
164 | 167 |
|
165 | 168 | if issubclass(etype, exceptions.PluginError):
|
166 | 169 | try: # clever errors shouldn't break other things
|
|
0 commit comments