{"record":{"id":"dc92ca749f3d9e3d","repo":"thanos-io/thanos","slug":"log-start-call-is-not-supported","errorCode":null,"errorMessage":"log start call is not supported","messagePattern":"log start call is not supported","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/logging/http.go","lineNumber":120,"sourceCode":"\to := evaluateOpt(opts)\n\treturn &HTTPServerMiddleware{\n\t\tlogger: log.With(logger, \"protocol\", \"http\", \"http.component\", \"server\"),\n\t\topts:   o,\n\t}\n}\n\n// getHTTPLoggingOption returns the logging ENUM based on logStart and logEnd values.\nfunc getHTTPLoggingOption(logStart, logEnd bool) (Decision, error) {\n\tif !logStart && !logEnd {\n\t\treturn NoLogCall, nil\n\t}\n\tif !logStart && logEnd {\n\t\treturn LogFinishCall, nil\n\t}\n\tif logStart && logEnd {\n\t\treturn LogStartAndFinishCall, nil\n\t}\n\treturn -1, fmt.Errorf(\"log start call is not supported\")\n}\n\n// getLevel returns the level based logger.\nfunc getLevel(lvl string) level.Option {\n\tswitch lvl {\n\tcase \"INFO\":\n\t\treturn level.AllowInfo()\n\tcase \"DEBUG\":\n\t\treturn level.AllowDebug()\n\tcase \"WARN\":\n\t\treturn level.AllowWarn()\n\tcase \"ERROR\":\n\t\treturn level.AllowError()\n\tdefault:\n\t\treturn level.AllowAll()\n\t}\n}\n","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/logging/http.go#L102-L138","documentation":"getHTTPLoggingOption maps logStart/logEnd booleans to HTTP logging options (LogFinishCall, LogStartAndFinishCall). The combination logStart=true with logEnd=false is not supported by this implementation, so it returns -1 with this error.","triggerScenarios":"Calling NewHTTPOption with a decision where logStart is true and logEnd is false in the HTTP logging YAML config.","commonSituations":"Users wanting to log only call starts; YAML configs translating another tool's 'log start' semantics directly into this field.","solutions":["Set logEnd: true as well (use LogStartAndFinishCall behavior).","Or disable logStart and keep logEnd: true for finish-only logging.","Update the YAML so the decision pair is one of: both false, end-only, or start+end."],"exampleFix":"// before\nhttp:\n  - level: INFO\n    logStart: true\n// after\nhttp:\n  - level: INFO\n    logStart: true\n    logEnd: true","handlingStrategy":"validation","validationCode":"if logStart && !logEnd { return fmt.Errorf(\"logStart alone is unsupported; enable logEnd too\") }","typeGuard":null,"tryCatchPattern":"opt, err := logging.NewHTTPOption(cfg)\nif err != nil { return fmt.Errorf(\"unsupported http log decision: %w\", err) }","preventionTips":["Enable logEnd whenever logStart is set","Restrict config generators to the supported combinations","Add a config lint rule rejecting start-only logging"],"tags":["http","logging","config-validation"],"backgroundTag":"unsupported-enum-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"}