mirror of
https://github.com/prometheus/prometheus.git
synced 2025-07-03 11:03:25 +00:00
Bump prometheus/common to v0.63.0 (#16210)
* Bump prometheus/common to v0.63.0 Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> * nolint usage of deprecated model.NameValidationScheme Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com> --------- Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
This commit is contained in:
parent
0bfbd462ac
commit
95f49dd84b
9 changed files with 13 additions and 8 deletions
|
@ -141,6 +141,7 @@ var (
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// This can be removed when the legacy global mode is fully deprecated.
|
// This can be removed when the legacy global mode is fully deprecated.
|
||||||
|
//nolint:staticcheck
|
||||||
model.NameValidationScheme = model.UTF8Validation
|
model.NameValidationScheme = model.UTF8Validation
|
||||||
|
|
||||||
prometheus.MustRegister(versioncollector.NewCollector(strings.ReplaceAll(appName, "-", "_")))
|
prometheus.MustRegister(versioncollector.NewCollector(strings.ReplaceAll(appName, "-", "_")))
|
||||||
|
|
|
@ -45,6 +45,7 @@ import (
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// This can be removed when the legacy global mode is fully deprecated.
|
// This can be removed when the legacy global mode is fully deprecated.
|
||||||
|
//nolint:staticcheck
|
||||||
model.NameValidationScheme = model.UTF8Validation
|
model.NameValidationScheme = model.UTF8Validation
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,6 +64,7 @@ import (
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// This can be removed when the legacy global mode is fully deprecated.
|
// This can be removed when the legacy global mode is fully deprecated.
|
||||||
|
//nolint:staticcheck
|
||||||
model.NameValidationScheme = model.UTF8Validation
|
model.NameValidationScheme = model.UTF8Validation
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ import (
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// This can be removed when the legacy global mode is fully deprecated.
|
// This can be removed when the legacy global mode is fully deprecated.
|
||||||
|
//nolint:staticcheck
|
||||||
model.NameValidationScheme = model.UTF8Validation
|
model.NameValidationScheme = model.UTF8Validation
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -837,6 +837,7 @@ func (c *ScrapeConfig) Validate(globalConfig GlobalConfig) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//nolint:staticcheck
|
||||||
if model.NameValidationScheme != model.UTF8Validation {
|
if model.NameValidationScheme != model.UTF8Validation {
|
||||||
return errors.New("model.NameValidationScheme must be set to UTF8")
|
return errors.New("model.NameValidationScheme must be set to UTF8")
|
||||||
}
|
}
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -53,7 +53,7 @@ require (
|
||||||
github.com/prometheus/alertmanager v0.28.0
|
github.com/prometheus/alertmanager v0.28.0
|
||||||
github.com/prometheus/client_golang v1.21.0-rc.0
|
github.com/prometheus/client_golang v1.21.0-rc.0
|
||||||
github.com/prometheus/client_model v0.6.1
|
github.com/prometheus/client_model v0.6.1
|
||||||
github.com/prometheus/common v0.62.0
|
github.com/prometheus/common v0.63.0
|
||||||
github.com/prometheus/common/assets v0.2.0
|
github.com/prometheus/common/assets v0.2.0
|
||||||
github.com/prometheus/exporter-toolkit v0.14.0
|
github.com/prometheus/exporter-toolkit v0.14.0
|
||||||
github.com/prometheus/sigv4 v0.1.2
|
github.com/prometheus/sigv4 v0.1.2
|
||||||
|
|
4
go.sum
4
go.sum
|
@ -441,8 +441,8 @@ github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p
|
||||||
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
|
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
|
||||||
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||||
github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
|
github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
|
||||||
github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io=
|
github.com/prometheus/common v0.63.0 h1:YR/EIY1o3mEFP/kZCD7iDMnLPlGyuU2Gb3HIcXnA98k=
|
||||||
github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I=
|
github.com/prometheus/common v0.63.0/go.mod h1:VVFF/fBIoToEnWRVkYoXEkq3R3paCoxG9PXP74SnV18=
|
||||||
github.com/prometheus/common/assets v0.2.0 h1:0P5OrzoHrYBOSM1OigWL3mY8ZvV2N4zIE/5AahrSrfM=
|
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/assets v0.2.0/go.mod h1:D17UVUE12bHbim7HzwUvtqm6gwBEaDQ0F+hIGbFbccI=
|
||||||
github.com/prometheus/exporter-toolkit v0.14.0 h1:NMlswfibpcZZ+H0sZBiTjrA3/aBFHkNZqE+iCj5EmRg=
|
github.com/prometheus/exporter-toolkit v0.14.0 h1:NMlswfibpcZZ+H0sZBiTjrA3/aBFHkNZqE+iCj5EmRg=
|
||||||
|
|
|
@ -45,7 +45,7 @@ func NewJSONFileLogger(s string) (*JSONFileLogger, error) {
|
||||||
return nil, fmt.Errorf("can't create json log file: %w", err)
|
return nil, fmt.Errorf("can't create json log file: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
jsonFmt := &promslog.AllowedFormat{}
|
jsonFmt := promslog.NewFormat()
|
||||||
_ = jsonFmt.Set("json")
|
_ = jsonFmt.Set("json")
|
||||||
return &JSONFileLogger{
|
return &JSONFileLogger{
|
||||||
handler: promslog.New(&promslog.Config{Format: jsonFmt, Writer: f}).Handler(),
|
handler: promslog.New(&promslog.Config{Format: jsonFmt, Writer: f}).Handler(),
|
||||||
|
|
|
@ -480,15 +480,15 @@ func TestEndpoints(t *testing.T) {
|
||||||
u, err := url.Parse(server.URL)
|
u, err := url.Parse(server.URL)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
al := promslog.AllowedLevel{}
|
al := promslog.NewLevel()
|
||||||
require.NoError(t, al.Set("debug"))
|
require.NoError(t, al.Set("debug"))
|
||||||
|
|
||||||
af := promslog.AllowedFormat{}
|
af := promslog.NewFormat()
|
||||||
require.NoError(t, af.Set("logfmt"))
|
require.NoError(t, af.Set("logfmt"))
|
||||||
|
|
||||||
promslogConfig := promslog.Config{
|
promslogConfig := promslog.Config{
|
||||||
Level: &al,
|
Level: al,
|
||||||
Format: &af,
|
Format: af,
|
||||||
}
|
}
|
||||||
|
|
||||||
dbDir := t.TempDir()
|
dbDir := t.TempDir()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue