diff options
author | pg9182 <96569817+pg9182@users.noreply.github.com> | 2022-11-20 02:43:40 -0500 |
---|---|---|
committer | pg9182 <96569817+pg9182@users.noreply.github.com> | 2022-11-20 06:12:13 -0500 |
commit | 250fb6e6505d2ac91e14f88edc4975f61e6da62a (patch) | |
tree | 1ce621af32b43b66c213bb79e8a4941ca24c593c /pkg/api/api0/metrics.go | |
parent | ff52bfe36e9c28fdc227bf68192777a9c655be08 (diff) | |
download | Atlas-250fb6e6505d2ac91e14f88edc4975f61e6da62a.tar.gz Atlas-250fb6e6505d2ac91e14f88edc4975f61e6da62a.zip |
pkg/api/api0: Set server region field from IP on create/update
Diffstat (limited to 'pkg/api/api0/metrics.go')
-rw-r--r-- | pkg/api/api0/metrics.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/api/api0/metrics.go b/pkg/api/api0/metrics.go index d9fa16d..57e3b0a 100644 --- a/pkg/api/api0/metrics.go +++ b/pkg/api/api0/metrics.go @@ -134,7 +134,9 @@ type apiMetrics struct { success *metrics.Histogram failure *metrics.Histogram } - server_remove_requests_total struct { + server_upsert_ip2location_errors_total *metrics.Counter + server_upsert_getregion_errors_total *metrics.Counter + server_remove_requests_total struct { success *metrics.Counter reject_unauthorized_ip *metrics.Counter reject_bad_request *metrics.Counter @@ -390,6 +392,8 @@ func (h *Handler) m() *apiMetrics { } mo.server_upsert_verify_time_seconds.success = mo.set.NewHistogram(`atlas_api0_server_upsert_verify_time_seconds{success="true"}`) mo.server_upsert_verify_time_seconds.failure = mo.set.NewHistogram(`atlas_api0_server_upsert_verify_time_seconds{success="false"}`) + mo.server_upsert_ip2location_errors_total = mo.set.NewCounter(`atlas_api0_server_upsert_ip2location_errors_total`) + mo.server_upsert_getregion_errors_total = mo.set.NewCounter(`atlas_api0_server_upsert_getregion_errors_total`) mo.server_remove_requests_total.success = mo.set.NewCounter(`atlas_api0_server_remove_requests_total{result="success"}`) mo.server_remove_requests_total.reject_unauthorized_ip = mo.set.NewCounter(`atlas_api0_server_remove_requests_total{result="reject_unauthorized_ip"}`) mo.server_remove_requests_total.reject_bad_request = mo.set.NewCounter(`atlas_api0_server_remove_requests_total{result="reject_bad_request"}`) |