From 26f9f5ca105710b53b2e34612c3653be54d1a645 Mon Sep 17 00:00:00 2001 From: Konstantin Pogorelov Date: Sat, 23 Sep 2017 12:13:14 +0200 Subject: [PATCH] add customLabels and transformLabels to advanced example --- advanced-example.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/advanced-example.js b/advanced-example.js index 5725465..b180a14 100644 --- a/advanced-example.js +++ b/advanced-example.js @@ -8,7 +8,9 @@ const bundle = promBundle({ blacklist: [/up/], buckets: [0.1, 0.4, 0.7], includeMethod: true, - includePath: true + includePath: true, + customLabels: {year: null}, + transformLabels: labels => Object.assign(labels, {year: new Date().getFullYear()}) }); app.use(bundle);