Skip to content

Commit d3b8bbd

Browse files
merge
2 parents 63be88b + 3c4127c commit d3b8bbd

File tree

3 files changed

+289
-441
lines changed

3 files changed

+289
-441
lines changed

sentry_sdk/integrations/django/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,9 @@ def _set_db_data(span, cursor_or_db, db_operation=None):
728728
vendor = db.vendor
729729
span.set_data(SPANDATA.DB_SYSTEM, vendor)
730730

731+
if db_operation is not None:
732+
span.set_data(SPANDATA.DB_OPERATION, db_operation)
733+
731734
# Some custom backends override `__getattr__`, making it look like `cursor_or_db`
732735
# actually has a `connection` and the `connection` has a `get_dsn_parameters`
733736
# attribute, only to throw an error once you actually want to call it.
@@ -761,9 +764,6 @@ def _set_db_data(span, cursor_or_db, db_operation=None):
761764
if db_name is not None:
762765
span.set_data(SPANDATA.DB_NAME, db_name)
763766

764-
if db_operation is not None:
765-
span.set_data(SPANDATA.DB_OPERATION, db_operation)
766-
767767
server_address = connection_params.get("host")
768768
if server_address is not None:
769769
span.set_data(SPANDATA.SERVER_ADDRESS, server_address)

0 commit comments

Comments
 (0)