Skip to content

Commit be1364f

Browse files
authored
[dbapi] return values for commit/rollback (#741)
1 parent a93e303 commit be1364f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ddtrace/contrib/dbapi/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ def cursor(self, *args, **kwargs):
147147

148148
def commit(self, *args, **kwargs):
149149
span_name = '{}.{}'.format(self._self_datadog_name, 'commit')
150-
self._trace_method(self.__wrapped__.commit, span_name, {}, *args, **kwargs)
150+
return self._trace_method(self.__wrapped__.commit, span_name, {}, *args, **kwargs)
151151

152152
def rollback(self, *args, **kwargs):
153153
span_name = '{}.{}'.format(self._self_datadog_name, 'rollback')
154-
self._trace_method(self.__wrapped__.rollback, span_name, {}, *args, **kwargs)
154+
return self._trace_method(self.__wrapped__.rollback, span_name, {}, *args, **kwargs)
155155

156156
def _get_vendor(conn):
157157
""" Return the vendor (e.g postgres, mysql) of the given

0 commit comments

Comments
 (0)