From c8b0b3160147a0a3337c9f35596964decb7782a7 Mon Sep 17 00:00:00 2001 From: Cecylia Bocovich Date: Thu, 14 Aug 2025 14:06:46 -0400 Subject: [PATCH] Clear map of seen proxy IP addresses We were not previously clearing the map we keep of seen IP addresses, which resulted in our unique proxy IP counts representing churn rather than unique IP counts per day, except during broker process restarts. --- broker/metrics.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/broker/metrics.go b/broker/metrics.go index cef62b3..a09691b 100644 --- a/broker/metrics.go +++ b/broker/metrics.go @@ -275,6 +275,8 @@ func (m *Metrics) printMetrics() { m.logger.Println("snowflake-ips-nat-restricted", m.loadAndZero("proxy-nat-restricted")) m.logger.Println("snowflake-ips-nat-unrestricted", m.loadAndZero("proxy-nat-unrestricted")) m.logger.Println("snowflake-ips-nat-unknown", m.loadAndZero("proxy-nat-unknown")) + + m.ips.Clear() } // binCount rounds count up to the next multiple of 8. Returns 0 on integer