grafana/k6 · error
trendAsNativeHistogram value must be true or false, not %q
Error message
trendAsNativeHistogram value must be true or false, not %q
What it means
Same pattern as insecureSkipTLSVerify: the trendAsNativeHistogram option value is parsed as a nullable bool via UnmarshalText and this error is raised when the value is not a valid boolean literal, rejecting the remote-write config string.
Source
Thrown at internal/output/prometheusrw/remotewrite/config.go:359
case "url":
c.ServerURL = null.StringFrom(v)
case "insecureSkipTLSVerify":
if err := c.InsecureSkipTLSVerify.UnmarshalText([]byte(v)); err != nil {
return c, fmt.Errorf("insecureSkipTLSVerify value must be true or false, not %q", v)
}
case "tlsMinVersion":
c.TLSMinVersion = null.StringFrom(v)
case "username":
c.Username = null.StringFrom(v)
case "password":
c.Password = null.StringFrom(v)
case "pushInterval":
if err := c.PushInterval.UnmarshalText([]byte(v)); err != nil {
return c, err
}
case "trendAsNativeHistogram":
if err := c.TrendAsNativeHistogram.UnmarshalText([]byte(v)); err != nil {
return c, fmt.Errorf("trendAsNativeHistogram value must be true or false, not %q", v)
}
// TODO: add the support for trendStats
// strvals doesn't support the same format used by --summary-trend-stats
// using the comma as the separator, because it is already used for
// dividing the keys.
//nolint:gocritic
//
//if v, ok := params["trendStats"].(string); ok && len(v) > 0 {
//c.TrendStats = strings.Split(v, ",")
//}
case "clientCertificate":
c.ClientCertificate = null.StringFrom(v)
case "clientCertificateKey":
c.ClientCertificateKey = null.StringFrom(v)
default:View on GitHub (pinned to 01ffac6f24)
Solutions
- Use trendAsNativeHistogram=true or trendAsNativeHistogram=false in the argument string
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at internal/output/prometheusrw/remotewrite/config.go:359 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of grafana/k6@01ffac6f24 (2026-08-18).
Data as JSON: /api/errors/85a7259aa3febd99.
Report an issue: GitHub.