DataDog / dd-trace-py

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

Cannot decode v0.5 traces payload: msgp: attempted to decode type "array" with method for "str" #4950

Closed takibelainine closed 1 year ago

takibelainine commented 1 year ago

Summary of problem

Datadog agent is responding with Cannot decode v0.5 traces payload: msgp: attempted to decode type "array" with method for "str" when receiving traces.

dd-trace version 1.7.2
ddagent 0.44

Which libraries and their versions are you using?

asyncio==3.4.3 attrs==21.4.0 billiard==3.6.4.0 black==21.12b0 boto3==1.20.40 botocore==1.23.40 bytecode==0.14.0 cattrs==22.2.0 certifi==2021.10.8 cfgv==3.3.1 charset-normalizer==2.0.10 click==8.0.3 coverage==6.2 datadog==0.44.0 ddsketch==2.0.4 ddtrace==1.7.2 direct-json-logger==0.3.0 distlib==0.3.4 envier==0.4.0 filelock==3.4.2 flake8==3.8.4 freezegun==1.1.0 gurobipy==10.0.0 identify==2.4.4 idna==3.3 iniconfig==1.1.1 jmespath==0.10.0 jsonschema==4.17.3 mccabe==0.6.1 memory-profiler==0.60.0 msgpack==1.0.4 mypy-extensions==0.4.3 nodeenv==1.6.0 orjson==3.8.5 packaging==21.3 pathspec==0.9.0 platformdirs==2.4.1 pluggy==1.0.0 pre-commit==2.17.0 protobuf==3.19.3 psutil==5.9.4 py==1.11.0 pycodestyle==2.6.0 pydantic==1.10.4 pyflakes==2.2.0 pyparsing==3.0.7 pyrsistent==0.19.3 pytest==6.2.5 pytest-mock==3.7.0 pytest-timeout==2.1.0 python-dateutil==2.8.2 python-dotenv==0.21.0 python-json-logger==2.0.2 PyYAML==6.0 requests==2.27.1 s3transfer==0.5.0 six==1.16.0 tenacity==8.0.1 toml==0.10.2 tomli==1.2.3 tox==3.24.5 typing_extensions==4.4.0 urllib3==1.26.8 virtualenv==20.13.0 wrapt==1.14.1 xmltodict==0.13.0

How can we reproduce your problem?

What is the result that you get?

"ddtrace.internal.writer", "message": "failed to send traces to Datadog Agent at http://10.75.251.215:8126/v0.5/traces: HTTP error status in ddtrace Cannot decode v0.5 traces payload: msgp: attempted to decode type "array" with method for "str" in datadog agent

What is the result that you expected?

mabdinur commented 1 year ago

Hi @progprob,

Thanks for opening this issue. The minimum supported agent version for ddtrace>=1.0 is v7.28 (version policy. Can you confirm your agent version?

To resolve this issue we recommend upgrading your datadog agent to the latest version (upgrade docs, releases). If this is not an option for you you can use the previous encoding format by setting the following environment variable: DD_TRACE_API_VERSION=v0.4 docs

Let us know if those options work for you 😄

takibelainine commented 1 year ago

Hello @mabdinur and that's for the quick reply. I'm actually using version 1.7.2. However, by setting DD_TRACE_API_VERSION=v0.4 as you suggested I got rid of the issue and for that I'm super thankful ! I'm closing the ticket for now then.