From: Otto Moerbeek Date: Mon, 20 Sep 2021 08:10:06 +0000 (+0000) Subject: Fix #10735: Prometheus formatting of tag values X-Git-Tag: dnsdist-1.7.0-alpha1~6^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6866d8f4c6b5ff7b905c40307468a8986a4d165b;p=thirdparty%2Fpdns.git Fix #10735: Prometheus formatting of tag values --- diff --git a/pdns/rec_channel_rec.cc b/pdns/rec_channel_rec.cc index dc3c87ab6b..88349e0155 100644 --- a/pdns/rec_channel_rec.cc +++ b/pdns/rec_channel_rec.cc @@ -1157,7 +1157,7 @@ static StatsMap toCPUStatsMap(const string& name) StatsMap entries; for (unsigned int n = 0; n < g_numThreads; ++n) { uint64_t tm = doGetThreadCPUMsec(n); - std::string pname = pbasename + "{thread=" + std::to_string(n) + '}'; + std::string pname = pbasename + "{thread=\"" + std::to_string(n) + "\"}"; entries.emplace(make_pair(name + "-thread-" + std::to_string(n), StatsMapEntry{pname, std::to_string(tm)})); } return entries;