From 072f54294e48ba5074b43d84b24802719c5a4265 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20W=C3=BCrbach?= Date: Thu, 2 Mar 2017 14:39:28 +0100 Subject: [PATCH] Allow to disable sending a host tag This allows to disable sending a host tag by setting the host to false. --- lib/librato.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/librato.js b/lib/librato.js index 1c5fa03..383d875 100644 --- a/lib/librato.js +++ b/lib/librato.js @@ -635,8 +635,10 @@ exports.init = function librato_init(startup_time, config, events, logger) writeToLegacy = config.librato.writeToLegacy; } - // Set host as a global tag. Defaults to os.hostname() - tags.host = hostName; + // Set host as a global tag. Defaults to os.hostname(). Can be disabled by setting host to false. + if (config.librato.hostName) { + tags.host = hostName; + } } if (!email || !token) {