thanos-io/thanos · error

log start call is not supported

Error message

log start call is not supported

What it means

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.

Solutions

  1. Set logEnd: true as well (use LogStartAndFinishCall behavior).
  2. Or disable logStart and keep logEnd: true for finish-only logging.
  3. Update the YAML so the decision pair is one of: both false, end-only, or start+end.

Example fix

// before
http:
  - level: INFO
    logStart: true
// after
http:
  - level: INFO
    logStart: true
    logEnd: true
Defensive patterns

Strategy: validation

Validate before calling

if logStart && !logEnd { return fmt.Errorf("logStart alone is unsupported; enable logEnd too") }

Try / catch

opt, err := logging.NewHTTPOption(cfg)
if err != nil { return fmt.Errorf("unsupported http log decision: %w", err) }

Prevention

When it happens

Trigger: Calling NewHTTPOption with a decision where logStart is true and logEnd is false in the HTTP logging YAML config.

Common situations: Users wanting to log only call starts; YAML configs translating another tool's 'log start' semantics directly into this field.

Related errors


AI-assisted analysis of thanos-io/thanos@35b8b99117 (2026-09-07). Data as JSON: /api/errors/dc92ca749f3d9e3d. Report an issue: GitHub.

Appendix: source

Thrown at pkg/logging/http.go:120

	o := evaluateOpt(opts)
	return &HTTPServerMiddleware{
		logger: log.With(logger, "protocol", "http", "http.component", "server"),
		opts:   o,
	}
}

// getHTTPLoggingOption returns the logging ENUM based on logStart and logEnd values.
func getHTTPLoggingOption(logStart, logEnd bool) (Decision, error) {
	if !logStart && !logEnd {
		return NoLogCall, nil
	}
	if !logStart && logEnd {
		return LogFinishCall, nil
	}
	if logStart && logEnd {
		return LogStartAndFinishCall, nil
	}
	return -1, fmt.Errorf("log start call is not supported")
}

// getLevel returns the level based logger.
func getLevel(lvl string) level.Option {
	switch lvl {
	case "INFO":
		return level.AllowInfo()
	case "DEBUG":
		return level.AllowDebug()
	case "WARN":
		return level.AllowWarn()
	case "ERROR":
		return level.AllowError()
	default:
		return level.AllowAll()
	}
}

View on GitHub (pinned to 35b8b99117)