thanos-io/thanos · error
error while parsing config for request logging
Error message
error while parsing config for request logging
What it means
The store command failed to parse the request-logging configuration file given via --request.logging-config. logging.ParseHTTPOptions/ParsegRPCOptions returned an error (invalid YAML or unknown fields), which is wrapped with this message; the second wrap covers the gRPC half of the same config.
Solutions
- Validate the YAML in the --request.logging-config file against the request logging schema (levels: debug|info|warn|error).
- Test with a minimal valid config: {"http":{"level":"info"},"grpc":{"level":"info"}}.
- Ensure the flag value is a valid path or base64-encoded content reachable from the sidecar process.
- Check the inner error message for the exact YAML/field that failed to parse.
Example fix
// before (request-logging.yml) http: level: verbose // after http: level: info grpc: level: info
Defensive patterns
Strategy: validation
Validate before calling
var cfg RequestLoggingConfig
if err := yaml.Unmarshal([]byte(loggingYAML), &cfg); err != nil {
return errors.Wrap(err, "invalid --request.logging-config")
} Try / catch
if err := startStore(); err != nil {
if strings.Contains(err.Error(), "request logging") { /* fix YAML, restart */ }
} Prevention
- Validate logging config YAML in CI with the same parser (logging.ParseHTTPOptions).
- Only use documented levels: debug, info, warn, error.
- Keep request-logging config files versioned next to deployment manifests.
When it happens
Trigger: --request.logging-config points to a file with invalid YAML, a wrong schema (e.g. unknown level like 'verbose'), or malformed per-method rules; either the HTTP or the gRPC parse step fails.
Common situations: Typo in the logging config YAML; using levels other than debug/info/warn/error; a config file written for a different component; missing file or wrong base64/file URL encoding in the flag.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- error while parsing config for request logging
- error while parsing tsdb selector configuration
- parse limit configuration
- error while parsing config for request logging
- parsing relabel configuration
AI-assisted analysis of thanos-io/thanos@35b8b99117 (2026-09-07).
Data as JSON: /api/errors/fb40f8c7db5f3134.
Report an issue: GitHub.
Appendix: source
Thrown at cmd/thanos/store.go:251
sc.reqLogConfig = extkingpin.RegisterRequestLoggingFlags(cmd)
}
// registerStore registers a store command.
func registerStore(app *extkingpin.App) {
cmd := app.Command(component.Store.String(), "Store node giving access to blocks in a bucket provider. Now supported GCS, S3, Azure, Swift, Tencent COS and Aliyun OSS.")
conf := &storeConfig{}
conf.registerFlag(cmd)
cmd.Setup(func(g *run.Group, logger log.Logger, reg *prometheus.Registry, tracer opentracing.Tracer, _ <-chan struct{}, debugLogging bool) error {
if conf.filterConf.MinTime.PrometheusTimestamp() > conf.filterConf.MaxTime.PrometheusTimestamp() {
return errors.Errorf("invalid argument: --min-time '%s' can't be greater than --max-time '%s'",
conf.filterConf.MinTime, conf.filterConf.MaxTime)
}
httpLogOpts, err := logging.ParseHTTPOptions(conf.reqLogConfig)
if err != nil {
return errors.Wrap(err, "error while parsing config for request logging")
}
grpcLogOpts, logFilterMethods, err := logging.ParsegRPCOptions(conf.reqLogConfig)
if err != nil {
return errors.Wrap(err, "error while parsing config for request logging")
}
conf.debugLogging = debugLogging
return runStore(g,
logger,
reg,
tracer,
httpLogOpts,
grpcLogOpts,
logFilterMethods,
*conf,View on GitHub (pinned to 35b8b99117)