# HG changeset patch # User Emmanuel Gil Peyrot # Date 1529620717 -7200 # Node ID 321fd53a319111e050638836d137dcd0548657ef # Parent 4ef28b6b4e87347c85b4f0555b1ac39dca3f603b mod_prometheus: Put the name as a label, which fits better the usual Prosody model. diff -r 4ef28b6b4e87 -r 321fd53a3191 mod_prometheus/mod_prometheus.lua --- a/mod_prometheus/mod_prometheus.lua Fri Jun 22 00:32:05 2018 +0200 +++ b/mod_prometheus/mod_prometheus.lua Fri Jun 22 00:38:37 2018 +0200 @@ -80,10 +80,10 @@ sect = sect:sub(16); end - local key = escape_name("prosody_"..sect.."_"..name); + local key = escape_name("prosody_"..sect); local field = { value = value, - labels = {}, + labels = { ["type"] = name}, -- TODO: Use the other types where it makes sense. typ = (typ == "rate" and "counter" or "gauge"), };