DataDog / dd-trace-py

Datadog Python APM Client
https://ddtrace.readthedocs.io/
Other
552 stars 414 forks source link

0.50 bug sanic APM #2678

Closed takearest118 closed 3 years ago

takearest118 commented 3 years ago

Thanks for taking the time for reporting an issue!

Before reporting an issue on dd-trace-py, please be sure to provide all necessary information.

If you're hitting a bug, make sure that you're using the latest version of this library.

Which version of dd-trace-py are you using?

0.50.0

Which version of pip are you using?

19.0.3

Which version of the libraries are you using?

Package Version


aiofiles 0.7.0 aiohttp 3.6.2 aiomysql 0.0.20 astroid 2.3.3 async-timeout 3.0.1 attrs 19.3.0 certifi 2019.9.11 cffi 1.13.2 chardet 3.0.4 Click 7.0 cryptography 2.8 ddtrace 0.50.0 Deprecated 1.2.11 elasticsearch 7.5.1 elasticsearch-async 6.2.0 h11 0.8.1 h2 3.1.1 hpack 3.0.0 hstspreload 2020.1.7 httpcore 0.3.0 httptools 0.0.13 httpx 0.9.3 hyperframe 5.2.0 idna 2.8 isort 4.3.21 lazy-object-proxy 1.4.3 mccabe 0.6.1 motor 2.4.0 multidict 5.1.0 packaging 21.0 peewee 3.13.1 pip 19.0.3 protobuf 3.17.3 pycparser 2.19 PyJWT 1.7.1 pymongo 3.11.4 PyMySQL 0.9.2 pyparsing 2.4.7 pytz 2019.3 PyYAML 5.3 requests 2.22.0 requests-async 0.5.0 rfc3986 1.3.2 sanic 21.3.4 sanic-motor 0.5.0 sanic-routing 0.6.2 sanic-scheduler 1.0.7 setuptools 40.8.0 six 1.14.0 sniffio 1.1.0 stringcase 1.2.0 tenacity 8.0.1 typed-ast 1.4.1 ujson 1.35 urllib3 1.25.6 uvloop 0.13.0 websockets 8.1 wrapt 1.11.2 yarl 1.4.2

How can we reproduce your problem?

Description

It's not working patch when apply APM on Sanic If path variable type is int on sanic route

Case code

@app.route('/<gam_id:int>/slot/count', methods=['GET'])
async def slot_count(request, gam_id):
    try:
        pass
    except Exception as e:
        abort(500, e)
    return json(response(200, 'Complete Successfully', {}))

Error

[2021-07-13 19:50:48 +0000] [13] [ERROR] Exception occurred while handling uri: 'http://xxxxxxxxx.xxx/25/slot/count'
NoneType: None

What is the result that you get?

my production env is not working on Sanic

What is the result that you expected?

I wanna use datadog APM on my production SANIC

I made already pull request

takearest118 commented 3 years ago

Why no reply?

P403n1x87 commented 3 years ago

@takearest118 sorry for the late reply. I just had a chance to look into this and found the potential cause. A fix will come with a new release.

takearest118 commented 3 years ago

@takearest118 sorry for the late reply. I just had a chance to look into this and found the potential cause. A fix will come with a new release.

@P403n1x87 Thanks When do you release this issue? Becuase I will pip install ddtrace on k8s.

Kyle-Verhoog commented 3 years ago

@takearest118 we've just done a patch release with this bug fix in v0.50.3 it should be on PyPI shortly 🙂

takearest118 commented 3 years ago

@takearest118 we've just done a patch release with this bug fix in v0.50.3 it should be on PyPI shortly 🙂

Thanks :-)