Skip to content

Commit 226a4c1

Browse files
committed
Make sure to finish span when there is an exception
1 parent b39471d commit 226a4c1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

instana/instrumentation/urllib3.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def urlopen_with_instana(wrapped, instance, args, kwargs):
2626
span.set_tag("error", True)
2727
ec = span.tags.get('ec', 0)
2828
span.set_tag("ec", ec+1)
29+
span.finish()
2930
raise
3031
else:
3132
span.finish()

0 commit comments

Comments
 (0)