Add v8 heap statistics to Health endpoint (#106)
diff --git a/provider/lib/health.js b/provider/lib/health.js
index ecfba29..bbdc01d 100644
--- a/provider/lib/health.js
+++ b/provider/lib/health.js
@@ -1,4 +1,5 @@
var si = require('systeminformation');
+var v8 = require('v8');
module.exports = function(utils) {
@@ -24,6 +25,8 @@
stats.disk = results[2];
stats.network = results[3];
stats.apiHostLatency = results[4];
+ stats.heapStatistics = v8.getHeapStatistics();
+ stats.heapSpaceStatistics =v8.getHeapSpaceStatistics();
res.send(stats);
})
.catch(error => {