From 53fc3e6e2f0107cfe2ca6415cb7bc099aa911400 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 6db792b..e927b99 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 (hostName) { + tags.host = hostName; + } } if (!email || !token) {