{"record":{"id":"10396285d5f43a65","repo":"grafana/k6","slug":"couldn-t-parse-the-otel-proto-w","errorCode":null,"errorMessage":"couldn't parse the otel proto: %w","messagePattern":"couldn't parse the otel proto: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/lib/trace/otel.go","lineNumber":202,"sourceCode":"\tif err != nil {\n\t\treturn params, fmt.Errorf(\"error while parsing otel configuration %w\", err)\n\t}\n\n\tfor _, token := range tokens {\n\t\tkey := token.Key\n\t\tvalue := token.Value\n\n\t\tvar err error\n\t\tswitch key {\n\t\tcase \"otel\":\n\t\t\terr = params.parseURL(value)\n\t\t\tif err != nil {\n\t\t\t\treturn params, fmt.Errorf(\"couldn't parse the otel URL: %w\", err)\n\t\t\t}\n\t\tcase \"proto\":\n\t\t\terr = params.parseProto(value)\n\t\t\tif err != nil {\n\t\t\t\treturn params, fmt.Errorf(\"couldn't parse the otel proto: %w\", err)\n\t\t\t}\n\t\tdefault:\n\t\t\tif strings.HasPrefix(key, \"header.\") {\n\t\t\t\tparams.parseHeader(key, value)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\treturn params, fmt.Errorf(\"unknown otel config key %s\", key)\n\t\t}\n\t}\n\n\tif params.proto == \"grpc\" && params.urlPath != \"\" {\n\t\treturn params, ErrInvalidGRPCWithURLPath\n\t}\n\n\treturn params, nil\n}\n\nfunc (p *tracerProviderParams) parseURL(s string) error {","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/lib/trace/otel.go#L184-L220","documentation":"The proto token in the otel configuration line is not a recognized transport. params.parseProto only accepts specific protocol names for the OTLP client; any other value in -o otel=proto=... (typos, unsupported protocols) triggers this generic parse-guard error.","triggerScenarios":"Thrown at internal/lib/trace/otel.go:202 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a supported protocol value, e.g. -o otel=proto=grpc or -o otel=proto=http","Check for typos and casing in the proto value","Omit proto= to use the default (grpc)"],"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"}