When the Extension is present, the Lambda library will use the DD API to send distribution metrics with timestamps instead of the Extension, since the Extension does not support historical distribution metrics. Metrics sent via the API currently do not get tagged with Lambda tags.
This adds some essential tags like those added via DD_TAGS and the function_arn. With the function_arn tag available, custom metrics will be enriched with other tags collected by the metadata crawler if the AWS integration is enabled:
Also added a warning log for historical distribution metrics that are sent to the API with an unsupported timestamp (>=4hrs).
What does this PR do?
When the Extension is present, the Lambda library will use the DD API to send distribution metrics with timestamps instead of the Extension, since the Extension does not support historical distribution metrics. Metrics sent via the API currently do not get tagged with Lambda tags.
This adds some essential tags like those added via
DD_TAGS
and thefunction_arn
. With thefunction_arn
tag available, custom metrics will be enriched with other tags collected by the metadata crawler if the AWS integration is enabled:Also added a warning log for historical distribution metrics that are sent to the API with an unsupported timestamp (>=4hrs).
Motivation
https://github.com/DataDog/datadog-lambda-js/issues/545
Testing Guidelines
Added tests and manually tested with local builds of the library.
Additional Notes
Types of Changes
Check all that apply