I have a lambda that is triggered by SQS. When there are multiple SQS messages to be processed, I can see that there's TypeError: trace_id must be an integer in the logs and no metrics is sent to DataDog.
Expected Behavior
Metrics are sent to DataDog without any errors.
Actual Behavior
TypeError mentioned above is raised and no metrics are sent to datadog.
Steps to Reproduce the Problem
- Create a SQS queue and lambda that it triggers
- Add multiple messages to SQS queue
- Check the logs in Cloudwatch and search for the error
Specifications
- Datadog Lambda Layer version: dd_lambda_layer:datadog-python38_3.33.0
- Python version: 3.8.0
I tested with 3.33.0, 3.32.0 and 2.30.0. Both 3.33.0 and 3.32.0 had this problem, but with 2.30.0 the error didn't occur and data was sent to DataDog.
Stacktrace
File "/opt/python/datadog_lambda/wrapper.py", line 161, in _before
set_correlation_ids()
File "/opt/python/datadog_lambda/tracing.py", line 297, in set_correlation_ids
span = tracer.trace("dummy.span")
File "/opt/python/ddtrace/tracer.py", line 626, in trace
return self.start_span(
File "/opt/python/ddtrace/tracer.py", line 427, in start_span
span = Span(
File "/opt/python/ddtrace/span.py", line 114, in __init__
raise TypeError("trace_id must be an integer")
TypeError: trace_id must be an integer
I have a lambda that is triggered by SQS. When there are multiple SQS messages to be processed, I can see that there's
TypeError: trace_id must be an integerin the logs and no metrics is sent to DataDog.Expected Behavior
Metrics are sent to DataDog without any errors.
Actual Behavior
TypeError mentioned above is raised and no metrics are sent to datadog.
Steps to Reproduce the Problem
Specifications
I tested with 3.33.0, 3.32.0 and 2.30.0. Both 3.33.0 and 3.32.0 had this problem, but with 2.30.0 the error didn't occur and data was sent to DataDog.
Stacktrace