kezhenxu94 commented on a change in pull request #85: URL: https://github.com/apache/skywalking-python/pull/85#discussion_r527824430
########## File path: skywalking/plugins/sw_http_server.py ########## @@ -53,15 +61,38 @@ def _wrap_run_wsgi(): carrier = Carrier() for item in carrier: item.val = handler.headers[item.key.capitalize()] - with context.new_entry_span(op=handler.path, carrier=carrier) as span: + path = handler.path or '/' + with context.new_entry_span(op=path.split("?")[0], carrier=carrier) as span: + url = 'http://' + handler.headers["Host"] + path if 'Host' in handler.headers else path span.layer = Layer.Http span.component = Component.General span.peer = '%s:%s' % handler.client_address span.tag(Tag(key=tags.HttpMethod, val=handler.command)) - return _run_wsgi() + span.tag(Tag(key=tags.HttpUrl, val=url)) Review comment: > Maybe will look into setting up test env but don't have too much more to add, maybe an sw_wsgiref plugin but will see, so for now lets see how this test comes back and hope its an easy fix. OK, so the there are diffs in test results, if you don't want to set up the env locally, they should be helpful to adjust, or, if you need any help, I can debug locally for you ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org