ackee-node-monitor-module
Advanced tools
Comparing version 0.0.12 to 0.0.13
@@ -19,3 +19,4 @@ /** | ||
level: config.winston.level, | ||
indexPrefix: config.winston.indexPrefix | ||
indexPrefix: config.winston.indexPrefix, | ||
flushInterval: config.winston.timeout || 2000, | ||
} | ||
@@ -22,0 +23,0 @@ )); |
12
index.js
@@ -72,3 +72,3 @@ /** | ||
var headers = {}; | ||
var newBody = {}; | ||
var reqData = {}; | ||
@@ -91,8 +91,8 @@ var diff = process.hrtime(hrStartTime); | ||
if (options.customBody) { | ||
options.customBody.forEach(body => { | ||
newBody[body.name] = _.get(req.body, body.path); | ||
if (options.customReqData) { | ||
options.customReqData.forEach(rq => { | ||
reqData[rq.name] = _.get(req, rq.path); | ||
}) | ||
} | ||
if (options.customResponseHeaders) { | ||
@@ -104,3 +104,3 @@ options.customResponseHeaders.forEach(header => { | ||
Winston.info('Time measuring log', _.merge({}, response, headers, newBody, options.customPayload)); | ||
Winston.info('Time measuring log', _.merge({}, response, headers, reqData, options.customPayload)); | ||
} catch (err) { | ||
@@ -107,0 +107,0 @@ console.error(`Ackee node monitor crashed with ${err}`); |
{ | ||
"name": "ackee-node-monitor-module", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "elasticsearch": "^11.0.1", |
@@ -33,2 +33,3 @@ ## Ackee Node Monitor Module | ||
indexPrefix: 'nodetemplate-monitor', | ||
timeout: 'time in ms' | ||
}, | ||
@@ -38,7 +39,11 @@ customHeaders: [ | ||
], | ||
customBody: [ | ||
customReqData: [ | ||
{ | ||
path: 'user.id', | ||
path: 'user', | ||
name: 'user' | ||
}, | ||
{ | ||
path: 'body.user.id', | ||
name: 'userId' | ||
} | ||
}, | ||
], | ||
@@ -63,2 +68,3 @@ } | ||
indexPrefix: 'nodetemplate-monitor', | ||
timeout: 10000 | ||
}, | ||
@@ -68,7 +74,11 @@ customHeaders: [ | ||
], | ||
customBody: [ | ||
customReqData: [ | ||
{ | ||
path: 'user.id', | ||
path: 'user', | ||
name: 'user' | ||
}, | ||
{ | ||
path: 'body.user.id', | ||
name: 'userId' | ||
} | ||
}, | ||
], | ||
@@ -75,0 +85,0 @@ }}, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9654
122
154