Testing BugSnag
with our Django
based REST-API server. I have an API endpoint that crashes on purpose just to test it, someone in a certain serializer my views use.
In my own settings.py
I have:
BUGSNAG = {
'api_key': '[redacted]',
'app_version': "1.0",
'project_root': "/path/to/my/project/folder/where/manage.py/is",
'release_stage': "development",
'notify_release_stages': ['development', 'staging', 'production']
}
MIDDLEWARE = (
'bugsnag.django.middleware.BugsnagMiddleware',
<all other middleware>
)
When I run my server like this: gunicorn myproj.wsgi -b 0.0.0.0:8000 --reload
or python manage.py runserver
BugSnag
reports all crashes correctly.
However, when I use gunicorn myproj.wsgi -b 0.0.0.0:8000 --reload --worker-class eventlet
BugSnag stops sending bug reports when exception occurr. The only clue I have for this behavior is this:
2020-02-08 02:34:37,363 - [bugsnag] ERROR - Notifying Bugsnag failed wrap_socket() got an unexpected keyword argument '_context'
Why does BugSnag stop working when gunicorn
is used with the eventlet
worker class? I am completely at a loss here. There is zero references to the subject online as if this problem only occurs on my computer.... not very encouraging.