def setup_sentry(project_name, channel, SENTRY_DSN): ''' Setup sentry account using taskcluster secrets ''' from raven import Client from raven.handlers.logbook import SentryHandler sentry_client = Client( dsn=SENTRY_DSN, site=project_name, name='mozilla-releng/services', environment=channel, # TODO: # release=read(VERSION) we need to promote that as well via secrets # tags=... # repos=... ) sentry = SentryHandler(sentry_client, level=logbook.WARNING, bubble=True) sentry.push_application()