@dazn/datadog-metrics
Advanced tools
Comparing version 1.3.1 to 1.4.0
{ | ||
"name": "@dazn/datadog-metrics", | ||
"version": "1.3.1", | ||
"version": "1.4.0", | ||
"description": "Records metrics with Datadog, supports both synchronous (via HTTP) and asynchronous (via Datadog's Lambda integration) modes. Defaults to asynchronous mode.", | ||
@@ -19,2 +19,6 @@ "main": "index.js", | ||
"devDependencies": { | ||
"@commitlint/cli": "^8.1.0", | ||
"@commitlint/config-conventional": "^8.1.0", | ||
"cz-conventional-changelog": "^3.0.2", | ||
"husky": "^3.0.4", | ||
"jest": "^23.1.0" | ||
@@ -24,3 +28,14 @@ }, | ||
"access": "public" | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "./node_modules/cz-conventional-changelog" | ||
} | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS", | ||
"pre-push": "npm run test" | ||
} | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# dazn-datadog-metrics | ||
# DAZN Datadog Metrics | ||
@@ -27,3 +27,3 @@ Helper module for recording metrics with Datadog. It supports both synchronous (via HTTP) and asynchronous (via Datadog's Lambda integration) modes. **Defaults to asynchronous mode.** | ||
Install from NPM: `npm install @perform/dazn-datadog-metrics` | ||
Install from NPM: `npm install @dazn/datadog-metrics` | ||
@@ -41,3 +41,3 @@ ## API | ||
// sent to stdout, using the DogStatsD format | ||
const Datadog = require('@perform/dazn-datadog-metrics') | ||
const Datadog = require('@dazn/datadog-metrics') | ||
@@ -63,3 +63,3 @@ Datadog.gauge('key', 42) // guage without tags | ||
Datadog.trackExecTime(f, 'key', [ 'tag1', 'tag2:42' ]) // track execution time with tags | ||
// by default, timestamp of the metric is the time when the function finishes, but you can | ||
// by default, timestamp of the metric is the time when the function finishes, but you can | ||
// override the timestamp yourself | ||
@@ -80,2 +80,2 @@ Datadog.trackExecTime(f, 'key', [], Date.now()) | ||
Datadog.trackExecTime(asyncF, 'key', [], Date.now()) | ||
``` | ||
``` |
9769
78
5