]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix #10735: Prometheus formatting of tag values
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 20 Sep 2021 08:10:06 +0000 (08:10 +0000)
committerOtto <otto.moerbeek@open-xchange.com>
Tue, 21 Sep 2021 05:16:29 +0000 (07:16 +0200)
pdns/rec_channel_rec.cc

index dc3c87ab6b3f581252b94f373ea21123efebe104..88349e0155e2fd0f2f3a2849af819fada75638e2 100644 (file)
@@ -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;