Slow cloud request/response tagging in Docker Lambda function with datadog-lambda
@joeyzhao2018 已經在處理了。
開始於 2025年7月14日。
評估
這個 Issue 還沒有評估資料。
描述
Hi, not sure if this is the right place or it should rather go to ddtrace or somewhere else:
Reproduction repo with CDK: https://github.com/maxfriedrich/datadog-cloud-payload-tagging-repro
The cloud request/response payload tagging feature causes a big slowdown for us for any DynamoDB query, even when "disabled" with the environment variable value "$.*" (0.xx seconds to > 10 seconds query), with the following setup:
- Docker Lambda based on the Lambda Python 3.11 (or 3.13) base image
- Installing the Datadog Lambda extension into the container
- Installing datadog-lambda and ddtrace with into the container
- Running the function with
datadog_lambda.handler
(this function outgrew the zip size limit, this is why it's built like this -- is this a supported setup?)
We can work around it by setting the environment variable values to "", fully disabling the feature, not just redacting all fields.
The problem only occurs with a Docker based Lambda function, the handler from my reproduction is fine in the Python runtime and the Datadog extension and Lambda layers.
Output from my test script:
Testing slow function: arn:aws:lambda:eu-central-1:...:function:DdTaggingReproStack-Function1904AA941-QLjJ2nwy96AV
Execution time: 11.545 seconds
Execution time: 10.865 seconds
Execution time: 11.279 seconds
Execution time: 11.604 seconds
Execution time: 11.659 seconds
Testing fast function: arn:aws:lambda:eu-central-1:...:function:DdTaggingReproStack-Function28EA0674A-36P7xO9x9CbG
Execution time: 0.235 seconds
Execution time: 0.188 seconds
Execution time: 0.168 seconds
Execution time: 0.194 seconds
Execution time: 0.206 seconds
Do you have any ideas what could cause this? Feel free to move the issue if it belongs somewhere else. Thank you very much!
- 主要語言
- Python
- 星號
- 102
- 分支
- 52
- 平均合併
- 5 天 19 小時
- 30 天內合併 PR
- 2
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
DataDog/datadog-lambda-python 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 70/100
DataDog/datadog-lambda-python#758 · 1 個 reaction ·
-
難度 2/5 1-3 小時 新手友好度 76/100
DataDog/datadog-lambda-python#755 ·
-
難度 4/5 3-5 天 新手友好度 30/100
DataDog/datadog-lambda-python#688 ·
-
難度 4/5 3-5 天 新手友好度 35/100
DataDog/datadog-lambda-python#682 · 1 則留言 ·
-
難度 3/5 1-2 天 新手友好度 45/100
DataDog/datadog-lambda-python#666 · 1 個 reaction ·
查看 DataDog/datadog-lambda-python 的全部 Issue
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 82/100
-
難度 2/5 1-3 小時 新手友好度 88/100
use-agent-os/agent-os#3314 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
BasedHardware/omi#15662 · 1 則留言 ·
-
documentation help wanted
難度 2/5 1-3 小時 新手友好度 90/100
-
難度 2/5 1-3 小時 新手友好度 62/100
AiursoftWeb/AnduinOS-2#19 ·