github DataDog/datadog-lambda-python v69

latest releases: v6.104.0, v6.103.0, v6.102.0...
20 months ago

⚠️ We recently identified that this library was incompatible with the newly added Lineage field of the X-Ray tracing header. This change has already been observed in eu-west-1 and eu-north-1 regions, and AWS will gradually roll out the change to the remaining regions in the next few weeks.

The impact is limited to Lambda functions with the environment variable DD_MERGE_XRAY_TRACES set to true. You can use the following metric query to find impacted Lambda functions in your Datadog orgs.

sum:aws.lambda.invocations{runtime:python*,dd.merge_xray_traces:true} by {aws_account,region,functionname}.as_count()

The impacted Lambda functions will

  • produce incomplete traces without the aws.lambda span if you have tracing enabled
  • produce the following errors to the logs
    Traceback (most recent call last):
    File "/var/task/datadog_lambda/wrapper.py", line 247, in _before
     set_dd_trace_py_root(trace_context_source, self.merge_xray_traces)
    File "/var/task/datadog_lambda/tracing.py", line 542, in set_dd_trace_py_root
     context = dict(dd_trace_context)
    TypeError: 'NoneType' object is not iterable

However,

  • The errors do NOT crash or degrade your application
  • There are no impact to metrics and logs collection
  • There are no impact to APM traces except for the aws.lambda spans

Although the error is non-fatal, we still recommend upgrade your datadog-lambda-library to the current version.

  • if you installed the datadog-lambda-python into your deployment package using pip, then you need to update the version to 4.69.0 in requirements.txt and redeploy.
  • if you installed the Datadog Lambda layer for Python, such as Datadog-Python38:68, you need to update the layer version to 69, in your CDK construct or SAM transform.
  • If you are using the plugin for serverless framework, you need to upgrade to v5.21.0.

What's Changed

arn:aws:lambda:<AWS_REGION>:464622532012:layer:Datadog-Python37:69
arn:aws:lambda:<AWS_REGION>:464622532012:layer:Datadog-Python38:69
arn:aws:lambda:<AWS_REGION>:464622532012:layer:Datadog-Python38-ARM:69
arn:aws:lambda:<AWS_REGION>:464622532012:layer:Datadog-Python39:69
arn:aws:lambda:<AWS_REGION>:464622532012:layer:Datadog-Python39-ARM:69
arn:aws-us-gov:lambda:us-gov-<AWS_REGION>:002406178527:layer:Datadog-Python37:69
arn:aws-us-gov:lambda:us-gov-<AWS_REGION>:002406178527:layer:Datadog-Python38:69
arn:aws-us-gov:lambda:us-gov-<AWS_REGION>:002406178527:layer:Datadog-Python38-ARM:69
arn:aws-us-gov:lambda:us-gov-<AWS_REGION>:002406178527:layer:Datadog-Python39:69
arn:aws-us-gov:lambda:us-gov-<AWS_REGION>:002406178527:layer:Datadog-Python39-ARM:69

Full Changelog: v68...v69

Don't miss a new datadog-lambda-python release

NewReleases is sending notifications on new releases.