From d0becef0bd5a8eb34da58744d12e6f074e3fb90e Mon Sep 17 00:00:00 2001 From: megastef Date: Tue, 28 Feb 2017 00:27:21 +0100 Subject: [PATCH] support npm 'startup' --- lib/httpServerAgent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/httpServerAgent.js b/lib/httpServerAgent.js index 86cc326..6cbb1d5 100644 --- a/lib/httpServerAgent.js +++ b/lib/httpServerAgent.js @@ -94,7 +94,7 @@ module.exports = function httpServerAgent () { timer.reset() reqSize = 0 resSize = 0 - if (cluster.isMaster || process.env.NODE_APP_INSTANCE === 0 || process.env.SPM_MASTER_MODE === 1) { + if (cluster.isMaster || process.env.NODE_APP_INSTANCE === 0 || process.env.SPM_MASTER_MODE === '1' || process.env.STARTUP === 'true') { agent.addMetrics({ ts: now, name: 'numWorkers',