{"record":{"id":"fb40f8c7db5f3134","repo":"thanos-io/thanos","slug":"error-while-parsing-config-for-request-logging-fb40f8","errorCode":null,"errorMessage":"error while parsing config for request logging","messagePattern":"error while parsing config for request logging","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/thanos/store.go","lineNumber":251,"sourceCode":"\tsc.reqLogConfig = extkingpin.RegisterRequestLoggingFlags(cmd)\n}\n\n// registerStore registers a store command.\nfunc registerStore(app *extkingpin.App) {\n\tcmd := 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.\")\n\n\tconf := &storeConfig{}\n\tconf.registerFlag(cmd)\n\n\tcmd.Setup(func(g *run.Group, logger log.Logger, reg *prometheus.Registry, tracer opentracing.Tracer, _ <-chan struct{}, debugLogging bool) error {\n\t\tif conf.filterConf.MinTime.PrometheusTimestamp() > conf.filterConf.MaxTime.PrometheusTimestamp() {\n\t\t\treturn errors.Errorf(\"invalid argument: --min-time '%s' can't be greater than --max-time '%s'\",\n\t\t\t\tconf.filterConf.MinTime, conf.filterConf.MaxTime)\n\t\t}\n\n\t\thttpLogOpts, err := logging.ParseHTTPOptions(conf.reqLogConfig)\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, \"error while parsing config for request logging\")\n\t\t}\n\n\t\tgrpcLogOpts, logFilterMethods, err := logging.ParsegRPCOptions(conf.reqLogConfig)\n\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, \"error while parsing config for request logging\")\n\t\t}\n\n\t\tconf.debugLogging = debugLogging\n\n\t\treturn runStore(g,\n\t\t\tlogger,\n\t\t\treg,\n\t\t\ttracer,\n\t\t\thttpLogOpts,\n\t\t\tgrpcLogOpts,\n\t\t\tlogFilterMethods,\n\t\t\t*conf,","sourceCodeStart":233,"sourceCodeEnd":269,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/cmd/thanos/store.go#L233-L269","documentation":"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.","triggerScenarios":"--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.","commonSituations":"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.","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."],"exampleFix":"// before (request-logging.yml)\nhttp:\n  level: verbose\n// after\nhttp:\n  level: info\ngrpc:\n  level: info","handlingStrategy":"validation","validationCode":"var cfg RequestLoggingConfig\nif err := yaml.Unmarshal([]byte(loggingYAML), &cfg); err != nil {\n    return errors.Wrap(err, \"invalid --request.logging-config\")\n}","typeGuard":null,"tryCatchPattern":"if err := startStore(); err != nil {\n    if strings.Contains(err.Error(), \"request logging\") { /* fix YAML, restart */ }\n}","preventionTips":["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."],"tags":["configuration","logging","yaml","thanos-store"],"backgroundTag":"invalid-config-value","analyzedSha":"35b8b991177def87ed52dcf10f9b6d87f07282c8","analyzedAt":"2026-09-07T01:49:59.689Z","contentChangedAt":"2026-09-07T01:49:59.689Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}