Open timotheeg opened 1 week ago
Hi @timotheeg - thanks for reaching out!
We print metrics to stdout for customers using the Datadog Lambda Log Forwarder as a data egress mechanism. You can see this logic here. Given that you're using the Datadog Lambda Extension, that shouldn't be enabled unless log forwarding was inadvertently enabled as well with DD_FLUSH_TO_LOG: true
.
Can you share the configuration and code for your Lambda function which causes this issue to appear?
Thanks!
Thanks @astuyve
We print metrics to stdout for customers using the Datadog Lambda Log Forwarder as a data egress mechanism.
Noted, but so why is there a difference between sendDistributionMetricWithDate()
and sendDistributionMetric()
on the logging behaviour? When I use sendDistributionMetric()
, it does not log, and the data gets sent to DD (no run time error) 🤔 .
that shouldn't be enabled unless log forwarding was inadvertently enabled as well with
DD_FLUSH_TO_LOG: true
I can see the lambda DOES have DD_FLUSH_TO_LOG: true
in the env vars, I could turn that off and try again 🤔
But also I'll try making a minimal repro case to send you (so there's nothing related to my company in there).
Expected Behavior
Lambda using
sendDistributionMetricWithDate()
should work and metrics should be sentActual Behavior
In my Lambda, I have 2 calls to send metrics. I initially used
sendDistributionMetric()
, but decided to provide both the same date withsendDistributionMetricWithDate()
instead. The metrics are accepted, I can see the log entries:(why is this even printed in the log btw? did someone forgot to remove a console log?)
But at the end of processing, this error is logged:
Steps to Reproduce the Problem
arn:aws:lambda:ap-southeast-1:464622532012:layer:Datadog-Node20-x:115
arn:aws:lambda:ap-southeast-1:464622532012:layer:Datadog-Extension:65
sendDistributionMetric()
for 2 metrics, and verify data appears in DDsendDistributionMetricWithDate()
for the 2 metrics, and see the runtime errors in cloudwatch logsSpecifications
Stacktrace