From 52fd13bfc4a689f93d2ecbbfcf1ea38e01c7e21a Mon Sep 17 00:00:00 2001 From: hdhoang Date: Mon, 21 Mar 2022 15:49:14 +0700 Subject: [PATCH] Fix labels cardinality error when registering unknown pre-auth key --- CHANGELOG.md | 4 ++++ api.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a1c429f..d3aa8d53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## 0.16.0 (2022-xx-xx) +### Changes + +- Fix labels cardinality error when registering unknown pre-auth key [#519](https://github.com/juanfont/headscale/pull/519) + ## 0.15.0 (2022-03-20) **Note:** Take a backup of your database before upgrading. diff --git a/api.go b/api.go index eab8076e..61ec1b5f 100644 --- a/api.go +++ b/api.go @@ -573,7 +573,7 @@ func (h *Headscale) handleAuthKey( machineRegistrations.WithLabelValues("new", RegisterMethodAuthKey, "error", pak.Namespace.Name). Inc() } else { - machineRegistrations.WithLabelValues("new", RegisterMethodAuthKey, "error").Inc() + machineRegistrations.WithLabelValues("new", RegisterMethodAuthKey, "error", "unknown").Inc() } return