From 1b222af33009f7619b9c70a1c8da58ac88d6359f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Sep 2023 14:24:25 +0200 Subject: [PATCH] Bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0 (#182) * Bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0 Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.16.0 to 1.17.0. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/v1.17.0/CHANGELOG.md) - [Commits](https://github.com/prometheus/client_golang/compare/v1.16.0...v1.17.0) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Fix tests after changing prometheus version --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jakub Surdej --- collectors/collector_manager_test.go | 4 ++-- go.mod | 4 ++-- go.sum | 8 ++++---- prometheus_helper/prometheus_helper_test.go | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/collectors/collector_manager_test.go b/collectors/collector_manager_test.go index 72822b46..58131155 100644 --- a/collectors/collector_manager_test.go +++ b/collectors/collector_manager_test.go @@ -88,7 +88,7 @@ func TestCollect(t *testing.T) { metric := <-ch desc := metric.Desc() - expectedDesc := "Desc{fqName: \"mock_metric\", help: \"mock metric description\", constLabels: {}, variableLabels: []}" + expectedDesc := "Desc{fqName: \"mock_metric\", help: \"mock metric description\", constLabels: {}, variableLabels: {}}" if desc.String() != expectedDesc { t.Errorf("Expected metric description to be '%s', got %s", expectedDesc, desc.String()) } @@ -107,7 +107,7 @@ func TestDescribe(t *testing.T) { cm.Describe(ch) desc := <-ch - expectedDesc := "Desc{fqName: \"logstash_exporter_scrape_duration_seconds\", help: \"logstash_exporter: Duration of a scrape job.\", constLabels: {}, variableLabels: [{collector } {result }]}" + expectedDesc := "Desc{fqName: \"logstash_exporter_scrape_duration_seconds\", help: \"logstash_exporter: Duration of a scrape job.\", constLabels: {}, variableLabels: {collector,result}}" if desc.String() != expectedDesc { t.Errorf("Expected metric description to be '%s', got %s", expectedDesc, desc.String()) } diff --git a/go.mod b/go.mod index e3ba7548..b4d445a2 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/joho/godotenv v1.5.1 - github.com/prometheus/client_golang v1.16.0 + github.com/prometheus/client_golang v1.17.0 golang.org/x/exp v0.0.0-20230905200255-921286631fa9 ) @@ -26,7 +26,7 @@ require ( github.com/gkampitakis/go-snaps v0.4.8 github.com/golang/protobuf v1.5.3 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/prometheus/client_model v0.4.0 + github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 github.com/prometheus/common v0.44.0 github.com/prometheus/procfs v0.11.1 // indirect golang.org/x/sys v0.12.0 // indirect diff --git a/go.sum b/go.sum index d2f9c20b..952e7a6c 100644 --- a/go.sum +++ b/go.sum @@ -25,10 +25,10 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 h1:v7DLqVdK4VrYkVD5diGdl4sxJurKJEMnODWRJlxV9oM= +github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= diff --git a/prometheus_helper/prometheus_helper_test.go b/prometheus_helper/prometheus_helper_test.go index 1965b879..0d4269c7 100644 --- a/prometheus_helper/prometheus_helper_test.go +++ b/prometheus_helper/prometheus_helper_test.go @@ -17,7 +17,7 @@ func TestSimpleDescHelper(t *testing.T) { t.Run("NewDescWithHelp", func(t *testing.T) { desc := helper.NewDescWithHelp("metric", "help") - expectedDesc := "Desc{fqName: \"logstash_exporter_test_metric\", help: \"help\", constLabels: {}, variableLabels: []}" + expectedDesc := "Desc{fqName: \"logstash_exporter_test_metric\", help: \"help\", constLabels: {}, variableLabels: {}}" if desc.String() != expectedDesc { t.Errorf("incorrect metric description, expected %s but got %s", expectedDesc, desc.String()) } @@ -25,7 +25,7 @@ func TestSimpleDescHelper(t *testing.T) { t.Run("NewDescWithHelpAndLabel", func(t *testing.T) { desc := helper.NewDescWithHelpAndLabels("metric", "help", "customLabel") - expectedDesc := "Desc{fqName: \"logstash_exporter_test_metric\", help: \"help\", constLabels: {}, variableLabels: [{customLabel }]}" + expectedDesc := "Desc{fqName: \"logstash_exporter_test_metric\", help: \"help\", constLabels: {}, variableLabels: {customLabel}}" if desc.String() != expectedDesc { t.Errorf("incorrect metric description, expected %s but got %s", expectedDesc, desc.String()) }