This is a fork from native Datadog logger
This logger add some options for native Datadog logger
$ npm install @1xtr/moleculer-datadog-logger --save
// ES5 example
const CustomDatadogLogger = require('@1xtr/moleculer-datadog-logger');
// ES6+ example
import { CustomDatadogLogger } from '@1xtr/moleculer-datadog-logger';
module.exports = {
logger: new CustomDatadogLogger({
// put here your options
})
}
const defaultOptions = {
url: "https://http-intake.logs.us5.datadoghq.com/api/v2/logs",
apiKey: process.env.DATADOG_API_KEY,
ddSource: "moleculer",
env: undefined,
hostname: hostname(),
objectPrinter: null,
interval: 10 * 1000,
excludeModules: [],
}
{
"interval": 5000,
"excludeModules": [
"broker",
"registry",
"discovery",
"transporter",
"$node",
"transit",
"cacher"
]
}