We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7398431 commit fe021b3Copy full SHA for fe021b3
2 files changed
sqlalchemy_opentracing/__init__.py
@@ -176,6 +176,9 @@ def _engine_error_handler(exception_context):
176
span.set_tag('error', 'true')
177
span.finish()
178
179
+ if execution_context.compiled is not None:
180
+ clear_traced(execution_context.compiled.statement)
181
+
182
def _register_connection_events(conn):
183
'''
184
Register clean up events for our
tests/test_core.py
@@ -77,6 +77,7 @@ def test_traced_error(self):
77
'sqlalchemy.exception': 'table users already exists',
78
'error': 'true',
79
})
80
+ self.assertEqual(False, sqlalchemy_opentracing.get_traced(creat))
81
82
def test_trace_text(self):
83
tracer = DummyTracer()
0 commit comments