Closed chdsbd closed 2 years ago
Sentry instruments calls to cursor.execute and cursor.executemany, but misses other database calls when Django opens a connection.
cursor.execute
cursor.executemany
When Django opens a connection it makes a few network calls that would be useful to record.
Instrument Django calls to DatabaseWrapper.connect so traces show all queries made to the database.
DatabaseWrapper.connect
https://github.com/django/django/blob/8d9827c06ce1592cca111e7eafb9ebe0153104ef/django/db/backends/base/base.py#L197-L200
This should be in sentry-python.
Problem Statement
Sentry instruments calls to
cursor.execute
andcursor.executemany
, but misses other database calls when Django opens a connection.When Django opens a connection it makes a few network calls that would be useful to record.
Solution Brainstorm
Instrument Django calls to
DatabaseWrapper.connect
so traces show all queries made to the database.https://github.com/django/django/blob/8d9827c06ce1592cca111e7eafb9ebe0153104ef/django/db/backends/base/base.py#L197-L200