From fc8822a4cf3ca36978c8d0b5d8ed61582a56462c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Mon, 16 Dec 2024 12:22:04 +0100 Subject: [PATCH] dnsdist: fix empty labels check in json stats endpoint --- pdns/dnsdistdist/dnsdist-web.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/dnsdistdist/dnsdist-web.cc b/pdns/dnsdistdist/dnsdist-web.cc index 91ad9110a7..26c34edc4d 100644 --- a/pdns/dnsdistdist/dnsdist-web.cc +++ b/pdns/dnsdistdist/dnsdist-web.cc @@ -931,7 +931,7 @@ static void addStatsToJSONObject(Json::object& obj) if (entry.d_name == "special-memory-usage") { continue; // Too expensive for get-all } - if (entry.d_labels.empty()) { + if (!entry.d_labels.empty()) { continue; // Skip labeled metrics to prevent duplicates } if (const auto& val = std::get_if(&entry.d_value)) { -- 2.47.2