mirror of
https://github.com/prometheus/prometheus.git
synced 2025-08-05 21:57:09 +02:00
config.ScrapeConfig.Validate: Fix MetricNameEscapingScheme error messages (#16801)
* config.ScrapeConfig.Validate: Fix MetricNameEscapingScheme error messages --------- Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
parent
2a88f562d1
commit
d902abc50d
@ -907,7 +907,7 @@ func (c *ScrapeConfig) Validate(globalConfig GlobalConfig) error {
|
||||
}
|
||||
case model.AllowUTF8, model.EscapeUnderscores, model.EscapeDots, model.EscapeValues:
|
||||
default:
|
||||
return fmt.Errorf("unknown global name escaping method specified, must be one of '%s', '%s', '%s', or '%s', got %s", model.AllowUTF8, model.EscapeUnderscores, model.EscapeDots, model.EscapeValues, globalConfig.MetricNameValidationScheme)
|
||||
return fmt.Errorf("unknown global name escaping method specified, must be one of '%s', '%s', '%s', or '%s', got %q", model.AllowUTF8, model.EscapeUnderscores, model.EscapeDots, model.EscapeValues, globalConfig.MetricNameEscapingScheme)
|
||||
}
|
||||
|
||||
if c.MetricNameEscapingScheme == "" {
|
||||
@ -921,7 +921,7 @@ func (c *ScrapeConfig) Validate(globalConfig GlobalConfig) error {
|
||||
}
|
||||
case model.EscapeUnderscores, model.EscapeDots, model.EscapeValues:
|
||||
default:
|
||||
return fmt.Errorf("unknown scrape config name escaping method specified, must be one of '%s', '%s', '%s', or '%s', got %s", model.AllowUTF8, model.EscapeUnderscores, model.EscapeDots, model.EscapeValues, c.MetricNameValidationScheme)
|
||||
return fmt.Errorf("unknown scrape config name escaping method specified, must be one of '%s', '%s', '%s', or '%s', got %q", model.AllowUTF8, model.EscapeUnderscores, model.EscapeDots, model.EscapeValues, c.MetricNameEscapingScheme)
|
||||
}
|
||||
|
||||
if c.ConvertClassicHistogramsToNHCB == nil {
|
||||
|
Loading…
Reference in New Issue
Block a user