aboutsummaryrefslogtreecommitdiffstats
path: root/core/moduleapi.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/moduleapi.lua')
-rw-r--r--core/moduleapi.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua
index 870a6a50..cbb2da9c 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -558,6 +558,7 @@ end
function api:metric(type_, name, unit, description, label_keys, conf)
local metric = require "core.statsmanager".metric;
local is_scoped = self.host ~= "*"
+ label_keys = label_keys or {};
if is_scoped then
-- prepend `host` label to label keys if this is not a global module
local orig_labels = label_keys