From a6ee0e3f268f9a847bf8a19159cf291021a0f38e Mon Sep 17 00:00:00 2001 From: bndw Date: Sun, 15 Feb 2026 10:23:33 -0800 Subject: feat: add auth rejection metrics to dashboard Updated metrics dashboard to show: - Unauthorized: Requests rejected due to pubkey not in allowlist - Pre-Auth: Requests sent before authentication completed - Challenges: Successful AUTH challenge completions This surfaces the new 'unauthorized' and 'unauthenticated' request status metrics on the dashboard for easier monitoring of auth issues. --- internal/metrics/dashboard.html | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'internal') diff --git a/internal/metrics/dashboard.html b/internal/metrics/dashboard.html index 1fa1ddf..ab08eab 100644 --- a/internal/metrics/dashboard.html +++ b/internal/metrics/dashboard.html @@ -168,12 +168,16 @@

Authentication

- Success + Challenges 0
- Failed - 0 + Unauthorized + 0 +
+
+ Pre-Auth + 0
@@ -305,8 +309,11 @@ document.getElementById('auth_success').textContent = getMetricByLabel(metrics, `${prefix}_relay_auth_attempts_total`, 'result', 'success'); - document.getElementById('auth_failure').textContent = - getMetricByLabel(metrics, `${prefix}_relay_auth_attempts_total`, 'result', 'failure'); + document.getElementById('auth_unauthorized').textContent = + getMetricByLabel(metrics, `${prefix}_relay_requests_total`, 'status', 'unauthorized'); + + document.getElementById('auth_unauthenticated').textContent = + getMetricByLabel(metrics, `${prefix}_relay_requests_total`, 'status', 'unauthenticated'); document.getElementById('rate_limit_hits').textContent = sumMetric(metrics, `${prefix}_relay_rate_limit_hits_total`); -- cgit v1.2.3