When capturing lambda payload, always cast number into string for sec… #422
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.
…urity reasons.
What does this PR do?
When the env
DD_CAPTURE_LAMBDA_PAYLOAD
set to true, the datadog-lambda-js library can capture the lambda's request and responses by parsing them and tagging the span with the keys and values.This change is to make sure no values are tagged as number by casting them into strings.
Motivation
Treating the payloads values as string for this very payload capturing feature is expected behavior. This does't change the payload. This is strictly for the payload capturing feature and it does't imply other scenarios should follow the same pattern.
Testing Guidelines
This has been tested in our serverless sandbox us-west-2 region joey-node-hello-world lambda. For serverless teammates, feel free to check its environment setting and test
Additional Notes
Types of Changes
Check all that apply