diff options
| author | bndw <ben@bdw.to> | 2026-02-15 10:22:32 -0800 |
|---|---|---|
| committer | bndw <ben@bdw.to> | 2026-02-15 10:22:32 -0800 |
| commit | e26729f658739b368073b558eb909af137609dfa (patch) | |
| tree | 3e574bf390235d16af78d1c902d1c349f4400ca8 /internal/auth/validation.go | |
| parent | 16a38f97183e4cbaf95c510c85d61f5a45873f4b (diff) | |
feat: track auth rejections with specific 'unauthorized' status
Auth failures (pubkey not in allowlist) are now tracked with status
'unauthorized' instead of generic 'error' in metrics. This allows
monitoring of auth rejections separately from other errors.
Metrics will now show:
- muxstr_relay_requests_total{status="unauthorized"} - auth failures
- muxstr_relay_requests_total{status="unauthenticated"} - no auth yet
- muxstr_relay_requests_total{status="error"} - other errors
- muxstr_relay_requests_total{status="rate_limited"} - rate limited
- muxstr_relay_requests_total{status="ok"} - success
Added test assertion to verify metrics tracking.
Diffstat (limited to 'internal/auth/validation.go')
0 files changed, 0 insertions, 0 deletions
