{"record":{"id":"1fd873f8979057a5","repo":"grafana/k6","slug":"couldn-t-parse-the-otel-url-w","errorCode":null,"errorMessage":"couldn't parse the otel URL: %w","messagePattern":"couldn't parse the otel URL: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/lib/trace/otel.go","lineNumber":197,"sourceCode":"\tif traceOutput != \"otel\" {\n\t\treturn params, fmt.Errorf(\"%w %q\", ErrInvalidTracesOutput, traceOutput)\n\t}\n\n\ttokens, err := strvals.Parse(line)\n\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}","sourceCodeStart":179,"sourceCodeEnd":215,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/lib/trace/otel.go#L179-L215","documentation":"The endpoint value given via the otel= URL/endpoint setting could not be parsed by params.parseURL. This is a generic guard over the endpoint string — the input at fault is the endpoint/URL token in the -o otel=... configuration line — and fires on malformed URLs or endpoints that do not match the expected format.","triggerScenarios":"Thrown at internal/lib/trace/otel.go:197 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a well-formed endpoint, e.g. otel=grpc://127.0.0.1:4317 or a host:port / URL accepted by the parser","Check for typos, missing port, or unsupported URL scheme","Compare against the working default endpoint 127.0.0.1:4317"],"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"}