diff --git a/go.mod b/go.mod index 7e586580e..517cfec83 100644 --- a/go.mod +++ b/go.mod @@ -51,7 +51,7 @@ require ( github.com/prometheus/alertmanager v0.26.0 github.com/prometheus/client_golang v1.18.0 github.com/prometheus/client_model v0.5.0 - github.com/prometheus/common v0.46.0 + github.com/prometheus/common v0.46.1-0.20240206181200-773d5664eb8d github.com/prometheus/common/assets v0.2.0 github.com/prometheus/common/sigv4 v0.1.0 github.com/prometheus/exporter-toolkit v0.11.0 diff --git a/go.sum b/go.sum index fd9c104ca..d3410b6a7 100644 --- a/go.sum +++ b/go.sum @@ -672,6 +672,8 @@ github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9 github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.46.0 h1:doXzt5ybi1HBKpsZOL0sSkaNHJJqkyfEWZGGqqScV0Y= github.com/prometheus/common v0.46.0/go.mod h1:Tp0qkxpb9Jsg54QMe+EAmqXkSV7Evdy1BTn+g2pa/hQ= +github.com/prometheus/common v0.46.1-0.20240206181200-773d5664eb8d h1:cX7RXwXdSy339hITL5WeF6EeHIvAK6xUIT23xWYBSkg= +github.com/prometheus/common v0.46.1-0.20240206181200-773d5664eb8d/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/common/assets v0.2.0 h1:0P5OrzoHrYBOSM1OigWL3mY8ZvV2N4zIE/5AahrSrfM= github.com/prometheus/common/assets v0.2.0/go.mod h1:D17UVUE12bHbim7HzwUvtqm6gwBEaDQ0F+hIGbFbccI= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= diff --git a/model/textparse/openmetricsparse.go b/model/textparse/openmetricsparse.go index 0b016a7f2..800e9467d 100644 --- a/model/textparse/openmetricsparse.go +++ b/model/textparse/openmetricsparse.go @@ -26,7 +26,6 @@ import ( "github.com/prometheus/common/model" - "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/exemplar" "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" diff --git a/model/textparse/openmetricsparse_test.go b/model/textparse/openmetricsparse_test.go index 3afeb0c2b..63a1583b1 100644 --- a/model/textparse/openmetricsparse_test.go +++ b/model/textparse/openmetricsparse_test.go @@ -301,10 +301,10 @@ foo_total 17.0 1520879607.789 # {id="counter-test"} 5` } func TestUTF8OpenMetricsParse(t *testing.T) { - // model.NameValidationScheme = model.UTF8Validation - // defer func(){ - // model.NameValidationScheme = model.LegacyValidation - // }() + model.NameValidationScheme = model.UTF8Validation + defer func(){ + model.NameValidationScheme = model.LegacyValidation + }() input := `# HELP "go.gc_duration_seconds" A summary of the GC invocation durations. # TYPE "go.gc_duration_seconds" summary @@ -324,7 +324,7 @@ func TestUTF8OpenMetricsParse(t *testing.T) { m string t *int64 v float64 - typ MetricType + typ model.MetricType help string unit string comment string @@ -335,7 +335,7 @@ func TestUTF8OpenMetricsParse(t *testing.T) { help: "A summary of the GC invocation durations.", }, { m: "go.gc_duration_seconds", - typ: MetricTypeSummary, + typ: model.MetricTypeSummary, }, { m: "go.gc_duration_seconds", unit: "seconds", diff --git a/model/textparse/promparse.go b/model/textparse/promparse.go index 62d354d0f..350d52166 100644 --- a/model/textparse/promparse.go +++ b/model/textparse/promparse.go @@ -28,7 +28,6 @@ import ( "github.com/prometheus/common/model" - "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/exemplar" "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" diff --git a/model/textparse/promparse_test.go b/model/textparse/promparse_test.go index e1aecb594..504500daa 100644 --- a/model/textparse/promparse_test.go +++ b/model/textparse/promparse_test.go @@ -219,10 +219,10 @@ testmetric{label="\"bar\""} 1` } func TestUTF8PromParse(t *testing.T) { - // model.NameValidationScheme = model.UTF8Validation - // defer func() { - // model.NameValidationScheme = model.LegacyValidation - // }() + model.NameValidationScheme = model.UTF8Validation + defer func() { + model.NameValidationScheme = model.LegacyValidation + }() input := `# HELP "go.gc_duration_seconds" A summary of the GC invocation durations. # TYPE "go.gc_duration_seconds" summary @@ -242,7 +242,7 @@ func TestUTF8PromParse(t *testing.T) { m string t *int64 v float64 - typ MetricType + typ model.MetricType help string comment string }{ @@ -251,7 +251,7 @@ func TestUTF8PromParse(t *testing.T) { help: "A summary of the GC invocation durations.", }, { m: "go.gc_duration_seconds", - typ: MetricTypeSummary, + typ: model.MetricTypeSummary, }, { m: `{"go.gc_duration_seconds",quantile="0"}`, v: 4.9351e-05,