This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-python.git


The following commit(s) were added to refs/heads/master by this push:
     new 8e9ea9d  fix: sw_tornado async handler status set correctly (#115)
8e9ea9d is described below

commit 8e9ea9d3d6265dea1532cd75f66db12aafb90385
Author: Tomasz Pytel <[email protected]>
AuthorDate: Mon Jan 18 20:29:00 2021 -0300

    fix: sw_tornado async handler status set correctly (#115)
---
 skywalking/plugins/sw_tornado.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/skywalking/plugins/sw_tornado.py b/skywalking/plugins/sw_tornado.py
index 00d9ca5..b03a12b 100644
--- a/skywalking/plugins/sw_tornado.py
+++ b/skywalking/plugins/sw_tornado.py
@@ -64,9 +64,9 @@ def _gen_sw_get_response_func(old_execute):
                 span.tag(
                     Tag(key=tags.HttpUrl, 
val='{}://{}{}'.format(request.protocol, request.host, request.path)))
                 result = old_execute(self, *args, **kwargs)
-                span.tag(Tag(key=tags.HttpStatus, val=self._status_code, 
overridable=True))
                 if isawaitable(result):
                     result = await result
+                span.tag(Tag(key=tags.HttpStatus, val=self._status_code, 
overridable=True))
                 if self._status_code >= 400:
                     span.error_occurred = True
             return result

Reply via email to