From 8890b6b797d2933c228d0b5006be77b259b073fb Mon Sep 17 00:00:00 2001 From: Jake Schuurmans Date: Mon, 14 Oct 2024 16:32:40 -0400 Subject: [PATCH] FS-1732; Fix metrics error, and build error --- go.mod | 6 ++---- go.sum | 10 ++++------ internal/metrics/custom_metrics.go | 20 ++++++++------------ 3 files changed, 14 insertions(+), 22 deletions(-) diff --git a/go.mod b/go.mod index 037bb47..95dd6f3 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/metal-toolbox/fleet-scheduler -go 1.22.1 - -toolchain go1.23.1 +go 1.23 require ( github.com/coreos/go-oidc v2.2.1+incompatible @@ -10,7 +8,6 @@ require ( github.com/google/uuid v1.6.0 github.com/hashicorp/go-retryablehttp v0.7.7 github.com/jeremywohl/flatten v1.0.1 - github.com/metal-toolbox/bioscfg v0.1.0 github.com/metal-toolbox/conditionorc v1.1.8 github.com/metal-toolbox/fleetdb v1.19.5 github.com/metal-toolbox/rivets v1.3.10 @@ -26,6 +23,7 @@ require ( ) require ( + cloud.google.com/go/kms v1.17.1 // indirect github.com/banzaicloud/logrus-runtime-formatter v0.0.0-20190729070250-5ae5475bae5e // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bmc-toolbox/common v0.0.0-20240806132831-ba8adc6a35e3 // indirect diff --git a/go.sum b/go.sum index 3d51e15..c729053 100644 --- a/go.sum +++ b/go.sum @@ -52,12 +52,12 @@ cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykW cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= -cloud.google.com/go/iam v1.1.7 h1:z4VHOhwKLF/+UYXAJDFwGtNF0b6gjsW1Pk9Ml0U/IoM= -cloud.google.com/go/iam v1.1.7/go.mod h1:J4PMPg8TtyurAUvSmPj8FF3EDgY1SPRZxcUGrn7WXGA= +cloud.google.com/go/iam v1.1.8 h1:r7umDwhj+BQyz0ScZMp4QrGXjSTI3ZINnpgU2nlB/K0= +cloud.google.com/go/iam v1.1.8/go.mod h1:GvE6lyMmfxXauzNq8NbgJbeVQNspG+tcdL/W8QO1+zE= cloud.google.com/go/kms v1.17.1 h1:5k0wXqkxL+YcXd4viQzTqCgzzVKKxzgrK+rCZJytEQs= cloud.google.com/go/kms v1.17.1/go.mod h1:DCMnCF/apA6fZk5Cj4XsD979OyHAqFasPuA5Sd0kGlQ= -cloud.google.com/go/longrunning v0.5.6 h1:xAe8+0YaWoCKr9t1+aWe+OeQgN/iJK1fEgZSXmjuEaE= -cloud.google.com/go/longrunning v0.5.6/go.mod h1:vUaDrWYOMKRuhiv6JBnn49YxCPz2Ayn9GqyjaBT8/mA= +cloud.google.com/go/longrunning v0.5.7 h1:WLbHekDbjK1fVFD3ibpFFVoyizlLRl73I7YKuAKilhU= +cloud.google.com/go/longrunning v0.5.7/go.mod h1:8GClkudohy1Fxm3owmBGid8W0pSgodEMwEAztp38Xng= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -543,8 +543,6 @@ github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4 github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/metal-toolbox/bioscfg v0.1.0 h1:wVcs5ErvZYjTsMkF+jNR/wnq4U7RnQ2zbg3cG5RD16M= -github.com/metal-toolbox/bioscfg v0.1.0/go.mod h1:TFZ6gajwPQ8jwBvjLJ4KDBJ7YyfH+2cbU1ORFWGZVms= github.com/metal-toolbox/conditionorc v1.1.8 h1:5wjIdPLdLY2RkIeGZ73tTFEnKJxBzBM5ZJMopDqFgSg= github.com/metal-toolbox/conditionorc v1.1.8/go.mod h1:eXlXZoOJBmihR4/+xA2o1dj1sQTXkU63Ekma7Ouc+o0= github.com/metal-toolbox/fleetdb v1.19.5 h1:ERgdFAUtWnT/AeVhCGclsENmwPhU88JUcgOZAdxWKYI= diff --git a/internal/metrics/custom_metrics.go b/internal/metrics/custom_metrics.go index ff64cfd..19489e4 100644 --- a/internal/metrics/custom_metrics.go +++ b/internal/metrics/custom_metrics.go @@ -12,31 +12,27 @@ var ( func init() { ConditionorcErrorCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ - Namespace: "fleet-scheduler", + Namespace: "fleet_scheduler", Subsystem: "conditionorc", - Name: "fleet_scheduler_conditionorc_errors", + Name: "client_errors", Help: "a count of all errors attempting to reach conditionorc", - }, []string{ - "errors", - }, + }, []string{}, ) FleetdbErrorCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ - Namespace: "fleet-scheduler", + Namespace: "fleet_scheduler", Subsystem: "fleetdb", - Name: "fleet_scheduler_fleetdb_errors", + Name: "client_errors", Help: "a count of all errors attempting to reach fleetdb", - }, []string{ - "errors", - }, + }, []string{}, ) InventoryCounter = prometheus.NewCounterVec( prometheus.CounterOpts{ - Namespace: "fleet-scheduler", + Namespace: "fleet_scheduler", Subsystem: "core", - Name: "fleet_scheduler_inventory_count", + Name: "inventory_count", Help: "a count of all errors attempting to reach fleet-scheduler dependencies", }, []string{}, )