expose DD_CAPTURE_LAMBDA_PAYLOAD_MAX_DEPTH [SVLS-3853]#387
Merged
Conversation
joeyzhao2018
commented
Nov 9, 2023
| | DD_MIN_COLD_START_DURATION | Sets the minimum duration (in milliseconds) for a module load event to be traced via Cold Start Tracing. Number. Defaults to `3`. | | ||
| | DD_COLD_START_TRACE_SKIP_LIB | optionally skip creating Cold Start Spans for a comma-separated list of libraries. Useful to limit depth or skip known libraries. Default depends on runtime. | | ||
| | DD_CAPTURE_LAMBDA_PAYLOAD | [Captures incoming and outgoing AWS Lambda payloads][1] in the Datadog APM spans for Lambda invocations. Defaults to `false`. | | ||
| | DD_CAPTURE_LAMBDA_PAYLOAD_MAX_DEPTH | The captured AWS Lambda payloads will become tags of the `aws.lambda` span. This sets how deep it fathoms the JSON structure. When the max depth reached, the tag's value will be the stringified value of the deeper nested items. Defaults to `10`. <br> For example, with input payload as <pre>{<br> "lv1" : {<br> "lv2": {<br> "lv3": "val"<br> }<br> }<br>}</pre> When set to `2`, the resulted tag's key is `function.request.lv1.lv2` and value `{\"lv3\": \"val\"}`. <br> When set to `0`, the the resulted tag's key is just `function.request` and value is `{\"lv1\":{\"lv2\":{\"lv3\": \"val\"}}}` | |
Contributor
Author
duncanista
reviewed
Nov 9, 2023
duncanista
reviewed
Nov 9, 2023
duncanista
approved these changes
Nov 9, 2023
astuyve
approved these changes
Nov 9, 2023
astuyve
reviewed
Nov 9, 2023
| ) | ||
|
|
||
| if dd_capture_lambda_payload_enabled: | ||
| import datadog_lambda.tag_object as tag_object |
brett0000FF
reviewed
Nov 9, 2023
Co-authored-by: Brett Blue <84536271+brett0000FF@users.noreply.github.com>
brett0000FF
approved these changes
Nov 9, 2023
duncanista
approved these changes
Nov 10, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does this PR do?
DD_CAPTURE_LAMBDA_PAYLOAD_MAX_DEPTHenvironment variable. This is to achieve feature parity. Universal instrumentation already enabled the env: [Serverless] Capture lambda payload as tags datadog-agent#19450Motivation
Testing Guidelines
Additional Notes
Types of Changes
Check all that apply