-
Notifications
You must be signed in to change notification settings - Fork 598
Closed
Labels
Description
Problem Statement
It looks like when we add Sentry to a Django application with MongoDB, Djongo seems to be monkeypatching the connection object that we rely on, causing the django integration to break. The error thrown is:
File "/Users/user/opt/anaconda3/envs/ZETA/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
cursor.execute(sql, params)
File "/Users/user/opt/anaconda3/envs/ZETA/lib/python3.8/site-packages/django/db/backends/utils.py", line 98, in execute
return super().execute(sql, params)
File "/Users/user/opt/anaconda3/envs/ZETA/lib/python3.8/site-packages/sentry_sdk/integrations/django/__init__.py", line 615, in execute
_set_db_data(span, self)
File "/Users/user/opt/anaconda3/envs/ZETA/lib/python3.8/site-packages/sentry_sdk/integrations/django/__init__.py", line 657, in _set_db_data
cursor_or_db.connection.get_dsn_parameters()
File "/Users/user/opt/anaconda3/envs/ZETA/lib/python3.8/site-packages/pymongo/collection.py", line 3491, in __call__
raise TypeError("'Collection' object is not callable. If you meant to "
TypeError: 'Collection' object is not callable. If you meant to call the 'get_dsn_parameters' method on a 'Collection' object it is failing because no such method exists.
Solution Brainstorm
We should add support for Djongo so that adding Sentry's Django SDK works without any issues.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
No status