Closed
Description
Expected Behavior
when using sendDistributionMetricWithDate
with a valid date and extension is running. It should send the metric.
sendDistributionMetricWithDate(
'aws.cognito.custom.EstimatedNumberOfUsers',
nbUsers || 0,
new Date()
);
Actual Behavior
I am having a permission issue while my api key secret arn is well setup.
In my case, I could just replace by sendDistributionMetric
to make it work. Apparently it passes an invalid date to sendDistributionMetricWithDate
to pass through this code
datadog-lambda-js/src/metrics/listener.ts
Line 159 in 9e4af12
When the date is valid it does a direct call to the api and I get a permission issue.
Steps to Reproduce the Problem
1.sending metric with sendDistributionMetricWithDate and a valid date
Specifications
- Datadog Lambda Layer version:
Datadog-Extension-ARM:65
- Datadog-lambda-js: 9.115
- Node version: 20