{"_id":"n-cloudwatch-metrics","_rev":"42-fcf15546c33ea6143c6d78466933bd7c","name":"n-cloudwatch-metrics","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.2":{"name":"n-cloudwatch-metrics","version":"1.0.2","author":{"name":"Financial Times"},"license":"MIT","_id":"n-cloudwatch-metrics@1.0.2","maintainers":[{"name":"financial-times","email":"strategic.products@ft.com"}],"homepage":"https://github.com/Financial-Times/n-cloudwatch-metrics#readme","bugs":{"url":"https://github.com/Financial-Times/n-cloudwatch-metrics/issues"},"dist":{"shasum":"eb4b04c98aa8a764cb868eb934008fb1198a3aac","tarball":"https://registry.npmjs.org/n-cloudwatch-metrics/-/n-cloudwatch-metrics-1.0.2.tgz","integrity":"sha512-hKv8KWNRTObrVZVTYv3+JSZBgXabrOb2Ivcg9UhCP2Cy8a6G5XoeVbAQxQ1KuaQAFVAEcDp9COXNUbtpqKwJKw==","signatures":[{"sig":"MEUCIHYyY5unnnw+zGMsUyjyT4iduyeqdVIEQet4Mp/BFKO/AiEAnVyr1kgSrLkYOqL9FUVjGjAEcJ/E2NyhEL9aBtlzg1M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh20GaCRA9TVsSAnZWagAAD7oQAItKIad66wSPKP6ttRWo\nCRPRdookhKSS6BteQxhW2hLYMHUN0k7XQNwoAh7CJzFRWaOK80zsR89aLK0g\njKqqo27HeyLGGxY51TjkQMN6FxS/bxud2UYS1EVNcDiIdsbuS48dD2cDk2eA\nhG75Ak+b4U7rDW5D5BjmkG3KPYOj4I4baVbMymWb0HqHLa+/B5yU60QBeDuS\nTyqU7OtmWYjbSI+Qe1RdTX27QhIh1dp8vXyrOgdfHTr17trEqKm8Qu5lFwcM\nquR8oUhYOTEau5Ukqe5DjT7NJNcrrlEtj4qHAUdF2Be7yD3Nn4CbT/iJRsFb\nyLE6YMpcRPEPRA+rRRlnbOqHrbub/Iv+ULonzNA1191sfeJ6lcD2TA3AXRhB\nsKgqZbapDVA4csRpFp8IoXF8uadvxeul7EtvgZcgZXdEw5Ia4sEhfFiPxb1m\niWRbWm1NNPgYxeWfx3C+HjFk2Miq0ozGVbESSasSKJL8uyZFTdoDzmAFGuVt\nDUIL2sDEHm0l2GaZH3lrBZ4ypC1OkFueYMop8myJxI1tWKU3vUCcmQGlhPhC\n/qbWKGRoK0JX8vPUijPP0Uvf7z0VGi9sVDuZ1opsjDp2ecTn3Fk2D4NSQnH9\nBPS/WwJrew510/9I3tA3MYKQEop63FyUl+GsqbBkdrzIy7MIEfime/Ke6SVB\ndGMZ\r\n=bn/y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","_from":".","_shasum":"eb4b04c98aa8a764cb868eb934008fb1198a3aac","gitHead":"3ef9ed6205b946b677c0f04097b4d135c01ca223","scripts":{"test":"make test","prepush":"make verify -j3","commitmsg":"secret-squirrel-commitmsg","precommit":"secret-squirrel"},"_npmUser":{"name":"financial-times","email":"strategic.products@ft.com"},"deprecated":"This package is no longer supported","repository":{"url":"git+https://github.com/Financial-Times/n-cloudwatch-metrics.git","type":"git"},"_npmVersion":"3.10.8","description":"Small library for sending metrics to cloudwatch","directories":{},"_nodeVersion":"6.9.0","dependencies":{"aws-sdk":"^2.106.0","denodeify":"^1.2.1","npm-prepublish":"^1.2.3"},"devDependencies":{"chai":"^4.1.1","mocha":"^3.5.0","sinon":"^3.2.1","mock-require":"^2.0.2","@financial-times/n-gage":"^1.8.25"},"_npmOperationalInternal":{"tmp":"tmp/n-cloudwatch-metrics-1.0.2.tgz_1504192580747_0.6764397877268493","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-08-31T15:16:21.763Z","modified":"2026-10-06T13:40:48.799Z","1.0.2":"2017-08-31T15:16:21.763Z"},"bugs":{"url":"https://github.com/Financial-Times/n-cloudwatch-metrics/issues"},"author":{"name":"Financial Times"},"license":"MIT","homepage":"https://github.com/Financial-Times/n-cloudwatch-metrics#readme","repository":{"url":"git+https://github.com/Financial-Times/n-cloudwatch-metrics.git","type":"git"},"description":"Small library for sending metrics to cloudwatch","maintainers":[{"email":"code.management@ft.com","name":"the-ft"},{"email":"info+npm@rowanmanning.com","name":"rowanmanning"},{"email":"yay@chee.party","name":"chee"},{"email":"a@ax.gy","name":"alexwilson"},{"email":"howdy@aendra.com","name":"aendra"},{"email":"emma.lewis@ft.com","name":"emmalewis"},{"email":"hamza.samih@ft.com","name":"hamza.samih"},{"email":"robert.boulton@ft.com","name":"robertboulton"},{"email":"leila.micollier@ft.com","name":"leila.micollier"},{"email":"rob.godfrey@ft.com","name":"robgodfrey"}],"readme":"# n-cloudwatch-metrics\n\nA small library to send metrics to cloudwatch from your AWS lambdas, extracted from [n-lambda](www.github.com/Financial-Times/n-lambda)\n\n## Usage\n\nYou 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`.\n\nRequiring the module will return an instance of the cloudwatch client.\n\n```javascript\nconst metrics = require('n-cloudwatch-metrics');\n```\n\nYou 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.\n\n```javascript\nmetrics.count('nameOfMetric');\nmetrics.count('tenOfTheseThingsHappened', 10);\n```\n","readmeFilename":"README.md"}