YueLangsugar opened a new issue, #9129:
URL: https://github.com/apache/skywalking/issues/9129

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Apache SkyWalking Component
   
   Python Agent (apache/skywalking-python)
   
   ### What happened
   
   I started my tornado service and sent two identical requests, but only one 
link?
   
   
![image](https://user-images.githubusercontent.com/48346272/170223876-a4efd4a5-4a4b-4a81-a743-8b34ebae0438.png)
   
   
   
   
   ### What you expected to happen
   
   There is a problem with the link
   
   ### How to reproduce
   
   There is my code.  tornado==6.1
   
   `import asyncio
   from skywalking import agent, config
   from tornado.web import Application, RequestHandler, url
   from tornado.httpserver import HTTPServer
   from tornado.ioloop import IOLoop
   
   
   class SwTornadoHandler(RequestHandler):
   
       async def get(self):
           await asyncio.sleep(0.4)
           self.write({"ok": 1})
   
   
   if __name__ == '__main__':
       app = Application([
           url(r"/api/web/test", SwTornadoHandler)
       ])
   
       http_server = HTTPServer(app, xheaders=True)
       http_server.bind(9696)
       http_server.start(2)
   
       config.init(
           protocol="http",
           service_instance=f"127.0.0.1:9696",
           collector_address="127.0.0.1:12800",
           service_name="python-api-service")
       config.disable_plugins = ["sw_falcon", "sw_psycopg2", "sw_pyramid", 
"sw_sanic"]
       agent.start()
   
       IOLoop.current().start()
   
   
   
   `
   
   ### Anything else
   
   In skywalking/trace/context.py . I modified the code and found it normal, 
but I don't know why.
   source code:
   `    def _spans_dup():
           spans = __spans.get()[:]
           __spans.set(spans)
   
           return spans`
   
   modified code:
   
   `    def _spans_dup():
           # spans = __spans.get()[:]
           # __spans.set(spans)
           # 
           # return spans
           return __spans.get()
   
   `
   
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to