From 7db03692b623d640aac4e8830f75cb4e031fcf91 Mon Sep 17 00:00:00 2001 From: SuperQ Date: Sun, 20 Oct 2024 10:11:54 +0200 Subject: [PATCH] chore!: adopt log/slog, drop go-kit/log This PR includes: - linter updates to enable `sloglint` linter - Go dep updates for prometheus/{client_golang,common,exporter-toolkit} libs - refactorings to adopt log/slog in favor of go-kit/log The bulk of this PR was automated by the following script which is being used to aid in converting the various exporters/projects to use slog: https://gist.github.com/tjhop/49f96fb7ebbe55b12deee0b0312d8434 Signed-off-by: SuperQ --- .circleci/config.yml | 4 +-- .github/workflows/golangci-lint.yml | 13 +++---- .golangci.yml | 3 +- .promu.yml | 2 +- Makefile.common | 10 ++++-- cmd/client/main.go | 53 ++++++++++++++--------------- cmd/client/main_test.go | 11 ++---- cmd/proxy/coordinator.go | 15 ++++---- cmd/proxy/main.go | 37 ++++++++++---------- go.mod | 20 +++++------ go.sum | 42 ++++++++++++----------- 11 files changed, 105 insertions(+), 105 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7b416ce8..0d541dbc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,14 +5,14 @@ orbs: executors: golang: docker: - - image: cimg/go:1.22 + - image: cimg/go:1.23 - image: quay.io/prometheus/node-exporter:latest jobs: test: executor: golang environment: - prom_ver: 2.51.0 + prom_ver: 2.54.1 steps: - prometheus/setup_environment - run: wget https://github.com/prometheus/prometheus/releases/download/v${prom_ver}/prometheus-${prom_ver}.linux-amd64.tar.gz diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index a7a40c1b..1c099932 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -24,15 +24,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - name: install Go - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + - name: Install Go + uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: - go-version: 1.22.x + go-version: 1.23.x - name: Install snmp_exporter/generator dependencies run: sudo apt-get update && sudo apt-get -y install libsnmp-dev if: github.repository == 'prometheus/snmp_exporter' - name: Lint - uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0 + uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0 with: - version: v1.56.2 + args: --verbose + version: v1.60.2 diff --git a/.golangci.yml b/.golangci.yml index f634435b..0c066e5c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -3,6 +3,7 @@ linters: enable: - misspell - revive + - sloglint linters-settings: errcheck: @@ -11,8 +12,6 @@ linters-settings: - io.Copy # Used in HTTP handlers, any error is handled by the server itself. - (net/http.ResponseWriter).Write - # Never check for logger errors. - - (github.com/go-kit/log.Logger).Log revive: rules: # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter diff --git a/.promu.yml b/.promu.yml index 0f626b33..1cfd6cce 100644 --- a/.promu.yml +++ b/.promu.yml @@ -1,6 +1,6 @@ go: # This must match .circle/config.yml. - version: 1.22 + version: 1.23 repository: path: github.com/prometheus-community/pushprox build: diff --git a/Makefile.common b/Makefile.common index 0acfb9d8..cbb5d863 100644 --- a/Makefile.common +++ b/Makefile.common @@ -55,13 +55,13 @@ ifneq ($(shell command -v gotestsum 2> /dev/null),) endif endif -PROMU_VERSION ?= 0.15.0 +PROMU_VERSION ?= 0.17.0 PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz SKIP_GOLANGCI_LINT := GOLANGCI_LINT := GOLANGCI_LINT_OPTS ?= -GOLANGCI_LINT_VERSION ?= v1.56.2 +GOLANGCI_LINT_VERSION ?= v1.60.2 # golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64. # windows isn't included here because of the path separator being different. ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin)) @@ -275,3 +275,9 @@ $(1)_precheck: exit 1; \ fi endef + +govulncheck: install-govulncheck + govulncheck ./... + +install-govulncheck: + command -v govulncheck > /dev/null || go install golang.org/x/vuln/cmd/govulncheck@latest diff --git a/cmd/client/main.go b/cmd/client/main.go index 61841829..461f37f2 100644 --- a/cmd/client/main.go +++ b/cmd/client/main.go @@ -22,6 +22,7 @@ import ( "errors" "fmt" "io" + "log/slog" "net" "net/http" "net/url" @@ -32,13 +33,11 @@ import ( "github.com/Showmax/go-fqdn" "github.com/alecthomas/kingpin/v2" "github.com/cenkalti/backoff/v4" - "github.com/go-kit/log" - "github.com/go-kit/log/level" "github.com/prometheus-community/pushprox/util" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" - "github.com/prometheus/common/promlog" - "github.com/prometheus/common/promlog/flag" + "github.com/prometheus/common/promslog" + "github.com/prometheus/common/promslog/flag" ) var ( @@ -89,11 +88,11 @@ func newBackOffFromFlags() backoff.BackOff { // Coordinator for scrape requests and responses type Coordinator struct { - logger log.Logger + logger *slog.Logger } func (c *Coordinator) handleErr(request *http.Request, client *http.Client, err error) { - level.Error(c.logger).Log("err", err) + c.logger.Error("coordinator error", "error", err) scrapeErrorCounter.Inc() resp := &http.Response{ StatusCode: http.StatusInternalServerError, @@ -102,14 +101,14 @@ func (c *Coordinator) handleErr(request *http.Request, client *http.Client, err } if err = c.doPush(resp, request, client); err != nil { pushErrorCounter.Inc() - level.Warn(c.logger).Log("msg", "Failed to push failed scrape response:", "err", err) + c.logger.Warn("Failed to push failed scrape response:", "err", err) return } - level.Info(c.logger).Log("msg", "Pushed failed scrape response") + c.logger.Info("Pushed failed scrape response") } func (c *Coordinator) doScrape(request *http.Request, client *http.Client) { - logger := log.With(c.logger, "scrape_id", request.Header.Get("id")) + logger := c.logger.With("scrape_id", request.Header.Get("id")) timeout, err := util.GetHeaderTimeout(request.Header) if err != nil { c.handleErr(request, client, err) @@ -137,13 +136,13 @@ func (c *Coordinator) doScrape(request *http.Request, client *http.Client) { c.handleErr(request, client, fmt.Errorf("failed to scrape %s: %w", request.URL.String(), err)) return } - level.Info(logger).Log("msg", "Retrieved scrape response") + logger.Info("Retrieved scrape response") if err = c.doPush(scrapeResp, request, client); err != nil { pushErrorCounter.Inc() - level.Warn(logger).Log("msg", "Failed to push scrape response:", "err", err) + logger.Warn("Failed to push scrape response:", "err", err) return } - level.Info(logger).Log("msg", "Pushed scrape result") + logger.Info("Pushed scrape result") } // Report the result of the scrape back up to the proxy. @@ -182,28 +181,28 @@ func (c *Coordinator) doPush(resp *http.Response, origRequest *http.Request, cli func (c *Coordinator) doPoll(client *http.Client) error { base, err := url.Parse(*proxyURL) if err != nil { - level.Error(c.logger).Log("msg", "Error parsing url:", "err", err) + c.logger.Error("Error parsing url:", "err", err) return fmt.Errorf("error parsing url: %w", err) } u, err := url.Parse("poll") if err != nil { - level.Error(c.logger).Log("msg", "Error parsing url:", "err", err) + c.logger.Error("Error parsing url:", "err", err) return fmt.Errorf("error parsing url poll: %w", err) } url := base.ResolveReference(u) resp, err := client.Post(url.String(), "", strings.NewReader(*myFqdn)) if err != nil { - level.Error(c.logger).Log("msg", "Error polling:", "err", err) + c.logger.Error("Error polling:", "err", err) return fmt.Errorf("error polling: %w", err) } defer resp.Body.Close() request, err := http.ReadRequest(bufio.NewReader(resp.Body)) if err != nil { - level.Error(c.logger).Log("msg", "Error reading request:", "err", err) + c.logger.Error("Error reading request:", "err", err) return fmt.Errorf("error reading request: %w", err) } - level.Info(c.logger).Log("msg", "Got scrape request", "scrape_id", request.Header.Get("id"), "url", request.URL) + c.logger.Info("Got scrape request", "scrape_id", request.Header.Get("id"), "url", request.URL) request.RequestURI = "" @@ -221,32 +220,32 @@ func (c *Coordinator) loop(bo backoff.BackOff, client *http.Client) { if err := backoff.RetryNotify(op, bo, func(err error, _ time.Duration) { pollErrorCounter.Inc() }); err != nil { - level.Error(c.logger).Log("err", err) + c.logger.Error("backoff returned error", "error", err) } } } func main() { - promlogConfig := promlog.Config{} - flag.AddFlags(kingpin.CommandLine, &promlogConfig) + promslogConfig := promslog.Config{} + flag.AddFlags(kingpin.CommandLine, &promslogConfig) kingpin.HelpFlag.Short('h') kingpin.Parse() - logger := promlog.New(&promlogConfig) + logger := promslog.New(&promslogConfig) coordinator := Coordinator{logger: logger} if *proxyURL == "" { - level.Error(coordinator.logger).Log("msg", "--proxy-url flag must be specified.") + coordinator.logger.Error("--proxy-url flag must be specified.") os.Exit(1) } // Make sure proxyURL ends with a single '/' *proxyURL = strings.TrimRight(*proxyURL, "/") + "/" - level.Info(coordinator.logger).Log("msg", "URL and FQDN info", "proxy_url", *proxyURL, "fqdn", *myFqdn) + coordinator.logger.Info("URL and FQDN info", "proxy_url", *proxyURL, "fqdn", *myFqdn) tlsConfig := &tls.Config{} if *tlsCert != "" { cert, err := tls.LoadX509KeyPair(*tlsCert, *tlsKey) if err != nil { - level.Error(coordinator.logger).Log("msg", "Certificate or Key is invalid", "err", err) + coordinator.logger.Error("Certificate or Key is invalid", "err", err) os.Exit(1) } @@ -257,12 +256,12 @@ func main() { if *caCertFile != "" { caCert, err := os.ReadFile(*caCertFile) if err != nil { - level.Error(coordinator.logger).Log("msg", "Not able to read cacert file", "err", err) + coordinator.logger.Error("Not able to read cacert file", "err", err) os.Exit(1) } caCertPool := x509.NewCertPool() if ok := caCertPool.AppendCertsFromPEM(caCert); !ok { - level.Error(coordinator.logger).Log("msg", "Failed to use cacert file as ca certificate") + coordinator.logger.Error("Failed to use cacert file as ca certificate") os.Exit(1) } @@ -272,7 +271,7 @@ func main() { if *metricsAddr != "" { go func() { if err := http.ListenAndServe(*metricsAddr, promhttp.Handler()); err != nil { - level.Warn(coordinator.logger).Log("msg", "ListenAndServe", "err", err) + coordinator.logger.Warn("ListenAndServe", "err", err) } }() } diff --git a/cmd/client/main_test.go b/cmd/client/main_test.go index b7bc92c3..26254613 100644 --- a/cmd/client/main_test.go +++ b/cmd/client/main_test.go @@ -19,21 +19,16 @@ import ( "net/http" "net/http/httptest" "testing" -) - -type TestLogger struct{} -func (tl *TestLogger) Log(vars ...interface{}) error { - fmt.Printf("%+v\n", vars) - return nil -} + "github.com/prometheus/common/promslog" +) func prepareTest() (*httptest.Server, Coordinator) { ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) fmt.Fprintln(w, "GET /index.html HTTP/1.0\n\nOK") })) - c := Coordinator{logger: &TestLogger{}} + c := Coordinator{logger: promslog.NewNopLogger()} *proxyURL = ts.URL return ts, c } diff --git a/cmd/proxy/coordinator.go b/cmd/proxy/coordinator.go index 533626b2..3c5a6892 100644 --- a/cmd/proxy/coordinator.go +++ b/cmd/proxy/coordinator.go @@ -16,13 +16,12 @@ package main import ( "context" "fmt" + "log/slog" "net/http" "sync" "time" "github.com/alecthomas/kingpin/v2" - "github.com/go-kit/log" - "github.com/go-kit/log/level" "github.com/google/uuid" "github.com/prometheus-community/pushprox/util" "github.com/prometheus/client_golang/prometheus" @@ -55,11 +54,11 @@ type Coordinator struct { // Clients we know about and when they last contacted us. known map[string]time.Time - logger log.Logger + logger *slog.Logger } // NewCoordinator initiates the coordinator and starts the client cleanup routine -func NewCoordinator(logger log.Logger) (*Coordinator, error) { +func NewCoordinator(logger *slog.Logger) (*Coordinator, error) { c := &Coordinator{ waiting: map[string]chan *http.Request{}, responses: map[string]chan *http.Response{}, @@ -112,7 +111,7 @@ func (c *Coordinator) DoScrape(ctx context.Context, r *http.Request) (*http.Resp if err != nil { return nil, err } - level.Info(c.logger).Log("msg", "DoScrape", "scrape_id", id, "url", r.URL.String()) + c.logger.Info("DoScrape", "scrape_id", id, "url", r.URL.String()) r.Header.Add("Id", id) select { case <-ctx.Done(): @@ -133,7 +132,7 @@ func (c *Coordinator) DoScrape(ctx context.Context, r *http.Request) (*http.Resp // WaitForScrapeInstruction registers a client waiting for a scrape result func (c *Coordinator) WaitForScrapeInstruction(fqdn string) (*http.Request, error) { - level.Info(c.logger).Log("msg", "WaitForScrapeInstruction", "fqdn", fqdn) + c.logger.Info("WaitForScrapeInstruction", "fqdn", fqdn) c.addKnownClient(fqdn) // TODO: What if the client times out? @@ -165,7 +164,7 @@ func (c *Coordinator) WaitForScrapeInstruction(fqdn string) (*http.Request, erro // ScrapeResult send by client func (c *Coordinator) ScrapeResult(r *http.Response) error { id := r.Header.Get("Id") - level.Info(c.logger).Log("msg", "ScrapeResult", "scrape_id", id) + c.logger.Info("ScrapeResult", "scrape_id", id) ctx, cancel := context.WithTimeout(context.Background(), util.GetScrapeTimeout(maxScrapeTimeout, defaultScrapeTimeout, r.Header)) defer cancel() // Don't expose internal headers. @@ -217,7 +216,7 @@ func (c *Coordinator) gc() { deleted++ } } - level.Info(c.logger).Log("msg", "GC of clients completed", "deleted", deleted, "remaining", len(c.known)) + c.logger.Info("GC of clients completed", "deleted", deleted, "remaining", len(c.known)) knownClients.Set(float64(len(c.known))) }() } diff --git a/cmd/proxy/main.go b/cmd/proxy/main.go index aa8eb29a..8e9d6a6d 100644 --- a/cmd/proxy/main.go +++ b/cmd/proxy/main.go @@ -20,17 +20,16 @@ import ( "encoding/json" "fmt" "io" + "log/slog" "net/http" "os" "strings" "github.com/alecthomas/kingpin/v2" - "github.com/go-kit/log" - "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" - "github.com/prometheus/common/promlog" - "github.com/prometheus/common/promlog/flag" + "github.com/prometheus/common/promslog" + "github.com/prometheus/common/promslog/flag" "github.com/prometheus-community/pushprox/util" ) @@ -84,13 +83,13 @@ type targetGroup struct { } type httpHandler struct { - logger log.Logger + logger *slog.Logger coordinator *Coordinator mux http.Handler proxy http.Handler } -func newHTTPHandler(logger log.Logger, coordinator *Coordinator, mux *http.ServeMux) *httpHandler { +func newHTTPHandler(logger *slog.Logger, coordinator *Coordinator, mux *http.ServeMux) *httpHandler { h := &httpHandler{logger: logger, coordinator: coordinator, mux: mux} // api handlers @@ -127,15 +126,15 @@ func (h *httpHandler) handlePush(w http.ResponseWriter, r *http.Request) { io.Copy(buf, r.Body) scrapeResult, err := http.ReadResponse(bufio.NewReader(buf), nil) if err != nil { - level.Error(h.logger).Log("msg", "Error reading pushed response:", "err", err) + h.logger.Error("Error reading pushed response:", "err", err) http.Error(w, fmt.Sprintf("Error pushing: %s", err.Error()), 500) return } scrapeId := scrapeResult.Header.Get("Id") - level.Info(h.logger).Log("msg", "Got /push", "scrape_id", scrapeId) + h.logger.Info("Got /push", "scrape_id", scrapeId) err = h.coordinator.ScrapeResult(scrapeResult) if err != nil { - level.Error(h.logger).Log("msg", "Error pushing:", "err", err, "scrape_id", scrapeId) + h.logger.Error("Error pushing:", "err", err, "scrape_id", scrapeId) http.Error(w, fmt.Sprintf("Error pushing: %s", err.Error()), 500) } } @@ -145,13 +144,13 @@ func (h *httpHandler) handlePoll(w http.ResponseWriter, r *http.Request) { fqdn, _ := io.ReadAll(r.Body) request, err := h.coordinator.WaitForScrapeInstruction(strings.TrimSpace(string(fqdn))) if err != nil { - level.Info(h.logger).Log("msg", "Error WaitForScrapeInstruction:", "err", err) + h.logger.Info("Error WaitForScrapeInstruction:", "err", err) http.Error(w, fmt.Sprintf("Error WaitForScrapeInstruction: %s", err.Error()), 408) return } //nolint:errcheck // https://github.com/prometheus-community/PushProx/issues/111 request.WriteProxy(w) // Send full request as the body of the response. - level.Info(h.logger).Log("msg", "Responded to /poll", "url", request.URL.String(), "scrape_id", request.Header.Get("Id")) + h.logger.Info("Responded to /poll", "url", request.URL.String(), "scrape_id", request.Header.Get("Id")) } // handleListClients handles requests to list available clients as a JSON array. @@ -164,7 +163,7 @@ func (h *httpHandler) handleListClients(w http.ResponseWriter, r *http.Request) w.Header().Set("Content-Type", "application/json") //nolint:errcheck // https://github.com/prometheus-community/PushProx/issues/111 json.NewEncoder(w).Encode(targets) - level.Info(h.logger).Log("msg", "Responded to /clients", "client_count", len(known)) + h.logger.Info("Responded to /clients", "client_count", len(known)) } // handleProxy handles proxied scrapes from Prometheus. @@ -176,7 +175,7 @@ func (h *httpHandler) handleProxy(w http.ResponseWriter, r *http.Request) { resp, err := h.coordinator.DoScrape(ctx, request) if err != nil { - level.Error(h.logger).Log("msg", "Error scraping:", "err", err, "url", request.URL.String()) + h.logger.Error("Error scraping:", "err", err, "url", request.URL.String()) http.Error(w, fmt.Sprintf("Error scraping %q: %s", request.URL.String(), err.Error()), 500) return } @@ -194,23 +193,23 @@ func (h *httpHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } func main() { - promlogConfig := promlog.Config{} - flag.AddFlags(kingpin.CommandLine, &promlogConfig) + promslogConfig := promslog.Config{} + flag.AddFlags(kingpin.CommandLine, &promslogConfig) kingpin.HelpFlag.Short('h') kingpin.Parse() - logger := promlog.New(&promlogConfig) + logger := promslog.New(&promslogConfig) coordinator, err := NewCoordinator(logger) if err != nil { - level.Error(logger).Log("msg", "Coordinator initialization failed", "err", err) + logger.Error("Coordinator initialization failed", "err", err) os.Exit(1) } mux := http.NewServeMux() handler := newHTTPHandler(logger, coordinator, mux) - level.Info(logger).Log("msg", "Listening", "address", *listenAddress) + logger.Info("Listening", "address", *listenAddress) if err := http.ListenAndServe(*listenAddress, handler); err != nil { - level.Error(logger).Log("msg", "Listening failed", "err", err) + logger.Error("Listening failed", "err", err) os.Exit(1) } } diff --git a/go.mod b/go.mod index 6b6bc1c0..7389d03d 100644 --- a/go.mod +++ b/go.mod @@ -1,25 +1,25 @@ module github.com/prometheus-community/pushprox -go 1.21 +go 1.22 require ( github.com/Showmax/go-fqdn v1.0.0 github.com/alecthomas/kingpin/v2 v2.4.0 github.com/cenkalti/backoff/v4 v4.3.0 - github.com/go-kit/log v0.2.1 github.com/google/uuid v1.6.0 - github.com/prometheus/client_golang v1.19.0 - github.com/prometheus/common v0.51.1 + github.com/prometheus/client_golang v1.20.5 + github.com/prometheus/common v0.60.0 ) require ( github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/klauspost/compress v1.17.9 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/xhit/go-str2duration/v2 v2.1.0 // indirect - golang.org/x/sys v0.18.0 // indirect - google.golang.org/protobuf v1.33.0 // indirect + golang.org/x/sys v0.25.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect ) diff --git a/go.sum b/go.sum index d739f191..df0400c1 100644 --- a/go.sum +++ b/go.sum @@ -8,39 +8,41 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.51.1 h1:eIjN50Bwglz6a/c3hAgSMcofL3nD+nFQkV6Dd4DsQCw= -github.com/prometheus/common v0.51.1/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= +github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= +github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc= github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=