From 0fc3c816417ad2644c87d435df7810ca74e55af7 Mon Sep 17 00:00:00 2001 From: Brian Cunnie Date: Tue, 19 Nov 2024 09:25:10 -0800 Subject: [PATCH] Replace ambiguous metric, "Answered Queries" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I've always been uncomfortable with the metric "Answered Queries" — it implies that we don't answer all the queries. But we do answer all the queries! What the metric meant is "the number of DNS responses that we send that have one or more records in the ANSWER section". The new metric is "Answer ≥ 1". Not great, but better than before. --- integration_metrics_test.go | 5 +-- k8s/document_root_sslip.io/index.html | 44 +++++++++++++-------------- xip/xip.go | 2 +- 3 files changed, 25 insertions(+), 26 deletions(-) diff --git a/integration_metrics_test.go b/integration_metrics_test.go index bbc7819..6ac534e 100644 --- a/integration_metrics_test.go +++ b/integration_metrics_test.go @@ -205,12 +205,13 @@ func getMetrics(port int) (m xip.Metrics) { Expect(err).ToNot(HaveOccurred()) var uptime int var junk string + var greaterThanOrEqualsUnicode string _, err = fmt.Sscanf(string(stdout), "\"Uptime: %d\"\n"+ "\"Blocklist: %s %s %s\n"+ "\"Queries: %d (%s\n"+ // %s "swallows" the `/s"` at the end "\"TCP/UDP: %d/%d\"\n"+ - "\"Answered Queries: %d (%s\n"+ // %s "swallows" the `/s"` at the end + "\"Answer %s 1: %d (%s\n"+ // %s "swallows" the `/s"` at the end "\"A: %d\"\n"+ "\"AAAA: %d\"\n"+ "\"TXT Source: %d\"\n"+ @@ -222,7 +223,7 @@ func getMetrics(port int) (m xip.Metrics) { &junk, &junk, &junk, &m.Queries, &junk, &m.TCPQueries, &m.UDPQueries, - &m.AnsweredQueries, &junk, + &greaterThanOrEqualsUnicode, &m.AnsweredQueries, &junk, &m.AnsweredAQueries, &m.AnsweredAAAAQueries, &m.AnsweredTXTSrcIPQueries, diff --git a/k8s/document_root_sslip.io/index.html b/k8s/document_root_sslip.io/index.html index b3e04be..61f5965 100644 --- a/k8s/document_root_sslip.io/index.html +++ b/k8s/document_root_sslip.io/index.html @@ -125,8 +125,8 @@ src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"> accomplish this, set the following three DNS servers as NS records for the subdomain “xip.example.com”