{"record":{"id":"63126a26367e0dd9","repo":"grafana/k6","slug":"unknown-otel-config-key-s","errorCode":null,"errorMessage":"unknown otel config key %s","messagePattern":"unknown otel config key (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/lib/trace/otel.go","lineNumber":209,"sourceCode":"\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 {\n\tu, err := url.Parse(s)\n\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)","sourceCodeStart":191,"sourceCodeEnd":227,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/lib/trace/otel.go#L191-L227","documentation":"A validation guard in tracerProviderParamsFromConfigLine (K6_OTEL configuration parsing). It fires when an OTEL config line contains a key other than the recognized ones: 'otel' (URL), 'proto' (protocol), or a 'header.'-prefixed key. The at-fault input is the unrecognized key string from the K6_OTEL environment variable / config line.","triggerScenarios":"Thrown at internal/lib/trace/otel.go:209 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use only supported keys in the OTEL config: otel=<url>, proto=<http|grpc>, header.<name>=<value>","Check for typos in the config key (e.g. 'header' keys must start with 'header.')","See the k6 OpenTelemetry documentation for the accepted configuration format"],"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"}