-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: Python int too large to convert to C long #12240
Comments
Hey @lucas03, Can you open a support ticket here: https://help.datadoghq.com/hc/en-us/requests/new. The ddtrace-py library serializes trace data into msgpack. One of your spans likely contains an integer that is too large to encode as a C long (likely by this method). To debug further you can configure a trace filter to capture span attributes (Span.duration_ns, Span.start_ns, Span._metrics, etc.) that contain integers that can not be converted to a C long. Once we identify the source of this value we can take steps to correct it. |
Your request (#2028629) has been received and will be reviewed by our team.
Could the problem be with datadog lib or something else? I have tried downgrading to the original version of ddtrace, but failing test is still there (flaky, not failing all the time)
Could you give me code snippet you have in mind? BTW I have ddtrace disabled in tests, but that doesn't seem to work. |
requirements.txt
and test-requirements.txt
|
this is the traceback from tests:
|
I found how I introduced this issue. As a part of requirements upgrade, I squashed a small change in: from this:
to this:
so this no longer runs in our pytest jobs. This causes the span to be constructed with that big trace_id. I don't know why, as I'd expect spans not to be created if not explicitly configured. And we have this in pytest-ini file:
but anyway, fixed this issue by adding this to our conftest.py file:
|
Tracer Version(s)
doesnt work on:
Python Version(s)
Python 3.11
Pip Version(s)
pip 24.0
Bug Report
Our pytest job fail randomly.
Reproduction Code
No response
Error Logs
FAILED test/integration/mambo/status_banners/test_status_banners.py::test_banners__schedule_change_major[web-True] - RuntimeError: failed to pack span: <Span(id=4307602835879970050,trace_id=137759318570304310240605327865437761465,parent_id=17664599921369065393,name=flask.request)>. Exception: Python int too large to convert to C long
Libraries in Use
pytest==8.3.4
datadog==0.51.0
ddtrace==2.20.0
Operating System
Debian GNU/Linux 11 (bullseye)
The text was updated successfully, but these errors were encountered: