From 4909a9f9d23ad969a03676d87087c1edad632a5d Mon Sep 17 00:00:00 2001 From: bndw Date: Sun, 15 Feb 2026 17:10:49 -0800 Subject: fix: track rate limit hits in metrics - Added RecordRateLimitHit to MetricsRecorder interface - Call RecordRateLimitHit when EVENT or REQ is rate limited - Allows dashboard to show accurate rate limiting statistics - Previously rate limits were applied but not tracked --- internal/handler/websocket/handler_test.go | 1 + 1 file changed, 1 insertion(+) (limited to 'internal/handler/websocket/handler_test.go') diff --git a/internal/handler/websocket/handler_test.go b/internal/handler/websocket/handler_test.go index 604a190..2ef72fd 100644 --- a/internal/handler/websocket/handler_test.go +++ b/internal/handler/websocket/handler_test.go @@ -98,6 +98,7 @@ func (m *mockMetrics) RecordRequest(method, status string, duration float64) { m.requests[key]++ } func (m *mockMetrics) RecordAuthAttempt(success bool) {} +func (m *mockMetrics) RecordRateLimitHit(authenticated bool) {} func (m *mockMetrics) RecordBlockedEvent(kind int32) { m.mu.Lock() defer m.mu.Unlock() -- cgit v1.2.3