Search before asking
Apache SkyWalking Component
Python Agent (apache/skywalking-python)
What happened
I started my tornado service and sent two identical requests, but only one link?

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)
modified code:
`
def _spans_dup():
# spans = __spans.get()[:]
# __spans.set(spans)
#
# return spans
return __spans.get()
`
Are you willing to submit PR?
Code of Conduct
Search before asking
Apache SkyWalking Component
Python Agent (apache/skywalking-python)
What happened
I started my tornado service and sent two identical requests, but only one link?
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):
if name == 'main':
app = Application([
url(r"/api/web/test", SwTornadoHandler)
])
`
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)
modified code:
`
def _spans_dup():
# spans = __spans.get()[:]
# __spans.set(spans)
#
# return spans
return __spans.get()
`
Are you willing to submit PR?
Code of Conduct