Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Latest commit

 

History

History
49 lines (36 loc) · 1.58 KB

README.md

File metadata and controls

49 lines (36 loc) · 1.58 KB

aws-lambda-datadog Build Status

A small library to facilitate sending metrics from an aws lambda function to datadog.

Installation

npm install aws-lambda-datadog

Usage

var metrics = require("aws-lambda-datadog");
var defaultTags = ["context:ingestion", "environment:production"]

...
push("new", function(err, data)){
  if (err !== null) {
    metrics.increment("aws.lambda.pusher.success", 1, defaultTags)
  } else {
    metrics.increment("aws.lambda.pusher.error", 1, defaultTags)
  }
})
...

Api Reference

method type params
increment count metric name, value, tags (default is [])
gauge gauge metric name, value, tags (default is [])
histogram histogram metric name, value, tags (default is [])
check check metric name, value, tags (default is [])

References

Tests