{"record":{"id":"85a7259aa3febd99","repo":"grafana/k6","slug":"trendasnativehistogram-value-must-be-true-or-false","errorCode":null,"errorMessage":"trendAsNativeHistogram value must be true or false, not %q","messagePattern":"trendAsNativeHistogram value must be true or false, not %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/output/prometheusrw/remotewrite/config.go","lineNumber":359,"sourceCode":"\t\tcase \"url\":\n\t\t\tc.ServerURL = null.StringFrom(v)\n\t\tcase \"insecureSkipTLSVerify\":\n\t\t\tif err := c.InsecureSkipTLSVerify.UnmarshalText([]byte(v)); err != nil {\n\t\t\t\treturn c, fmt.Errorf(\"insecureSkipTLSVerify value must be true or false, not %q\", v)\n\t\t\t}\n\t\tcase \"tlsMinVersion\":\n\t\t\tc.TLSMinVersion = null.StringFrom(v)\n\t\tcase \"username\":\n\t\t\tc.Username = null.StringFrom(v)\n\t\tcase \"password\":\n\t\t\tc.Password = null.StringFrom(v)\n\t\tcase \"pushInterval\":\n\t\t\tif err := c.PushInterval.UnmarshalText([]byte(v)); err != nil {\n\t\t\t\treturn c, err\n\t\t\t}\n\t\tcase \"trendAsNativeHistogram\":\n\t\t\tif err := c.TrendAsNativeHistogram.UnmarshalText([]byte(v)); err != nil {\n\t\t\t\treturn c, fmt.Errorf(\"trendAsNativeHistogram value must be true or false, not %q\", v)\n\t\t\t}\n\n\t\t// TODO: add the support for trendStats\n\t\t// strvals doesn't support the same format used by --summary-trend-stats\n\t\t// using the comma as the separator, because it is already used for\n\t\t// dividing the keys.\n\t\t//nolint:gocritic\n\t\t//\n\t\t//if v, ok := params[\"trendStats\"].(string); ok && len(v) > 0 {\n\t\t//c.TrendStats = strings.Split(v, \",\")\n\t\t//}\n\n\t\tcase \"clientCertificate\":\n\t\t\tc.ClientCertificate = null.StringFrom(v)\n\t\tcase \"clientCertificateKey\":\n\t\t\tc.ClientCertificateKey = null.StringFrom(v)\n\n\t\tdefault:","sourceCodeStart":341,"sourceCodeEnd":377,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/output/prometheusrw/remotewrite/config.go#L341-L377","documentation":"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.","triggerScenarios":"Thrown at internal/output/prometheusrw/remotewrite/config.go:359 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use trendAsNativeHistogram=true or trendAsNativeHistogram=false in the argument string"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}