datamade / django-councilmatic

:heartpulse: Django app providing core functions for *.councilmatic.org
http://councilmatic.org
MIT License
26 stars 16 forks source link

Add raven client to import_data #149

Closed reginafcompton closed 6 years ago

reginafcompton commented 6 years ago

Relates to: https://github.com/datamade/la-metro-councilmatic/issues/234

@evz - can you take a look at this? From my understanding, for Sentry to record errors (i.e., in the case of transaction rollbacks), we need to create a Client. Does this make sense to you?

evz commented 6 years ago

You can do this a few different ways: https://docs.sentry.io/clients/python/integrations/django/

The way you've done it should work but you can also just import the client from the Django application context (since it is kinda configured for you that way) or you could just configure the logger that you have setup use sentry as a handler.

reginafcompton commented 6 years ago

Ahhhh....that's much better @evz. I imported the client with Django. Then, I can avoid grabbing the dsn from the settings, too.