Skip to content

Commit 8e9ea9d

Browse files
authored
fix: sw_tornado async handler status set correctly (#115)
1 parent 5badb67 commit 8e9ea9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

skywalking/plugins/sw_tornado.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ async def _sw_get_response(self, *args, **kwargs):
6464
span.tag(
6565
Tag(key=tags.HttpUrl, val='{}://{}{}'.format(request.protocol, request.host, request.path)))
6666
result = old_execute(self, *args, **kwargs)
67-
span.tag(Tag(key=tags.HttpStatus, val=self._status_code, overridable=True))
6867
if isawaitable(result):
6968
result = await result
69+
span.tag(Tag(key=tags.HttpStatus, val=self._status_code, overridable=True))
7070
if self._status_code >= 400:
7171
span.error_occurred = True
7272
return result

0 commit comments

Comments
 (0)