{"record":{"id":"1a2e2666594f8b66","repo":"grafana/k6","slug":"invalid-protocol-q","errorCode":null,"errorMessage":"invalid protocol: %q","messagePattern":"invalid protocol: %q","errorType":"validation","errorClass":"ErrInvalidProto","httpStatus":null,"severity":"error","filePath":"internal/lib/trace/otel.go","lineNumber":240,"sourceCode":"\tif err != nil {\n\t\treturn err\n\t}\n\n\tif u.Scheme != \"http\" && u.Scheme != \"https\" {\n\t\treturn fmt.Errorf(\"%w: %q\", ErrInvalidURLScheme, u.Scheme)\n\t}\n\n\tp.proto = \"http\"\n\tp.endpoint = u.Host\n\tp.urlPath = u.Path\n\tp.insecure = u.Scheme == \"http\"\n\n\treturn nil\n}\n\nfunc (p *tracerProviderParams) parseProto(proto string) error {\n\tif proto != \"http\" && proto != \"grpc\" {\n\t\treturn fmt.Errorf(\"%w: %q\", ErrInvalidProto, proto)\n\t}\n\n\tp.proto = proto\n\n\treturn nil\n}\n\nfunc (p *tracerProviderParams) parseHeader(header, value string) {\n\theaderName := strings.TrimPrefix(header, \"header.\")\n\tp.headers[headerName] = value\n}\n","sourceCodeStart":222,"sourceCodeEnd":252,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/lib/trace/otel.go#L222-L252","documentation":"A validation guard in parseProto that wraps ErrInvalidProto. It fires when the otel config's proto value is anything other than 'http' or 'grpc'. The at-fault input is the invalid proto string from the config line.","triggerScenarios":"Thrown at internal/lib/trace/otel.go:240 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set proto=http or proto=grpc in the otel configuration","Check for typos such as 'https' or 'HTTP' (matching is exact lowercase)"],"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-14T00:17:10.932Z"}