MCPcopy
hub / github.com/grafana/tempo / Validate

Method Validate

modules/generator/storage/config.go:35–42  ·  view source on GitHub ↗

Validate initializes and validates the remote write configurations. This must be called once at startup before any tenant storage instances are created, so that NameValidationScheme is set on all write relabel configs. Without this, relabeling panics with "Invalid name validation scheme requested: u

()

Source from the content-addressed store, hash-verified

33// that NameValidationScheme is set on all write relabel configs. Without this,
34// relabeling panics with "Invalid name validation scheme requested: unset".
35func (cfg *Config) Validate() error {
36 for i := range cfg.RemoteWrite {
37 if err := cfg.RemoteWrite[i].Validate(model.UTF8Validation); err != nil {
38 return fmt.Errorf("invalid remote write config %q: %w", cfg.RemoteWrite[i].Name, err)
39 }
40 }
41 return nil
42}
43
44func (cfg *Config) RegisterFlagsAndApplyDefaults(string, *flag.FlagSet) {
45 cfg.Wal = agentDefaultOptions()

Calls 1

ValidateMethod · 0.65