You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

13 lines
450 B

  1. # -*- coding: utf-8 -*-
  2. from __future__ import (absolute_import, division, print_function,
  3. unicode_literals)
  4. def register_sentry(sentry_dsn):
  5. """Given a Raven client and an RQ worker, registers exception handlers
  6. with the worker so exceptions are logged to Sentry.
  7. """
  8. import sentry_sdk
  9. from sentry_sdk.integrations.rq import RqIntegration
  10. sentry_sdk.init(sentry_dsn, integrations=[RqIntegration()])