* Install hot-shots * Add statsd client * Add some metrics * Add a comment * Comment typo fix Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com> Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
15 lines
266 B
JavaScript
15 lines
266 B
JavaScript
const StatsD = require('hot-shots')
|
|
|
|
const mock = Boolean(process.env.NODE_ENV === 'test' || !process.env.DATADOG_API_KEY)
|
|
|
|
/**
|
|
* @type {import('hot-shots').StatsD}
|
|
*/
|
|
module.exports = new StatsD({
|
|
prefix: 'docs.',
|
|
mock,
|
|
globalTags: {
|
|
app: 'docs'
|
|
}
|
|
})
|