code: def log_exception(self, typ, value, tb):
          
          rv = super(SentryMixin, self).log_exception(typ, value, tb)
          # Do not capture tornado.web.HTTPErrors outside the 500 range.
          if isinstance(value, WebHTTPError) and (value.status_code < 500 or value.status_code > 599):
              return rv
          self.captureException(exc_info=(typ, value, tb))
          return rv
docs: Override implementation to report all exceptions to sentry.
          log_exception() is added in Tornado v3.1.