DataDog / datadog-lambda-js

The Datadog AWS Lambda Library for Node
Apache License 2.0
113 stars 35 forks source link

Sending timer metrics #537

Closed tovbinm closed 6 months ago

tovbinm commented 6 months ago

Is there a way to send time elapsed (e.g. timer metrics) using datadog-lambda-js ?

purple4reina commented 6 months ago

You can do this using distribution metrics. In this doc, you'll want to replace the metric value with the duration you're looking to measure. https://docs.datadoghq.com/serverless/aws_lambda/metrics/?code-lang=nodejs#submit-custom-metrics-directly-from-a-lambda-function

tovbinm commented 6 months ago

Thanks. I will give it a try.