From 1c36339db792536b85c0949a2362d619384df654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Thu, 15 Nov 2018 14:48:34 +0100 Subject: [PATCH] fix formatting of metrics --- src/counter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/counter.js b/src/counter.js index 7cb5c08..713405e 100644 --- a/src/counter.js +++ b/src/counter.js @@ -3,7 +3,7 @@ const metricsHeader = ` # Counts of clicks for every key available in the service store. # HELP ${metricsName} List of clicks for counted for every key. # TYPE ${metricsName} counter -` +`.trim() class Counter { constructor(redis, name) { @@ -39,7 +39,7 @@ class Counter { let metricsFormatted = Object.keys(metrics).map((key) => ( `${metricsName}{key="${key}"} ${metrics[key]}` )) - return metricsHeader + metricsFormatted.join('\n') + return metricsHeader + '\n' + metricsFormatted.join('\n') } }