Search code examples
pythonpython-3.6sentry

How to enable DjangoIntegration in sentry


I am using the "new" sentry-sdk 0.9.0

The sdk as initialized as follows

import sentry_sdk                                                                                                        
from sentry_sdk.integrations.django import DjangoIntegration    
sentry_sdk.init(integrations=[DjangoIntegration(), ], dsn="...")

The events and exception do arrive at sentry.io. However, I'm getting the following warnings:

We recommend you update your SDK from version 0.9.0 to version 0.9.2 We recommend you enable the 'django' integration We recommend you enable the 'tornado' integration

The first one is because I haven't upgraded to 0.9.2 yet. I'm not using tornado, so this warning surprises me. And when it comes to the django integration recommendation, I'm puzzled.

Any ideas or suggestions what I am missing?

Thanks!!


Solution

  • I'm the guy who implemented those alerts. OP and I had a private conversation on this and the verdict is that those alerts are just not 100% reliable and can be ignored if they make no sense.

    The alerts just take the installed packages and look if there are any packages that we would have an integration for that is not enabled yet. This approach has problems when you e.g. use Django and Celery, but only enable the Django integration in the web worker and the Celery integration in the background worker (as far as I understood this is not what OP ran into though).

    I think the way forward is to make those alerts permanently dismissable, because I don't see a way right now to make them accurate. The motivation to inform people about integrations they might want to use, not to tell them what they have to do.

    That said, I am interested in cases where those alerts show nonsense. Feel free to post here or write me at markus@sentry.io.