Skip to content

Instantly share code, notes, and snippets.

@yothinix
Last active December 21, 2017 15:18
Show Gist options
  • Save yothinix/fb9b5cc0bb66901255092481b2aa8867 to your computer and use it in GitHub Desktop.
Save yothinix/fb9b5cc0bb66901255092481b2aa8867 to your computer and use it in GitHub Desktop.
from raven.contrib.django.client import DjangoClient as RavenDjangoClient
# override base Sentry Django client to sending service information
class SentryDjangoClient(RavenDjangoClient):
def build_msg(self, *args, **kwargs):
data = super(RavenDjangoClient, self).build_msg(*args, **kwargs)
data['tags']['SIMPLESAT_SERVICE'] = 'CUSTOMER'
data['tags']['SIMPLESAT_ENV'] = 'PRODUCTION'
return data
SENTRY_CLIENT = 'service_customer.settings.production.SentryDjangoClient'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment