Small library for sending metrics to cloudwatch
Last updated 3 years ago by financial-times .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install n-cloudwatch-metrics 
SYNC missed versions from official npm registry.


A small library to send metrics to cloudwatch from your AWS lambdas, extracted from n-lambda


You will need to set up an environmental variable called AWS_REGION with the correct region for your app (e.g. eu-west-1) and an environmental variable called AWS_LAMBDA_FUNCTION_NAME.

Requiring the module will return an instance of the cloudwatch client.

const metrics = require('n-cloudwatch-metrics');

You can then call the count method on this instance with the name of the metric as the first argument. There is a second optional argument that lets you specify what the number to add to the count is. It defaults to 1.

metrics.count('tenOfTheseThingsHappened', 10);

Current Tags

  • 1.0.2                                ...           latest (3 years ago)

1 Versions

  • 1.0.2                                ...           3 years ago
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (5)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |