{"record":{"id":"15533af3f4b163bc","repo":"grafana/k6","slug":"invalid-traces-output-q","errorCode":null,"errorMessage":"invalid traces output %q","messagePattern":"invalid traces output %q","errorType":"validation","errorClass":"ErrInvalidTracesOutput","httpStatus":null,"severity":"error","filePath":"internal/lib/trace/otel.go","lineNumber":180,"sourceCode":"\tparams, err := tracerProviderParamsFromConfigLine(line)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn NewTracerProvider(ctx, params)\n}\n\nfunc tracerProviderParamsFromConfigLine(line string) (tracerProviderParams, error) {\n\tparams := defaultTracerProviderParams()\n\n\tif line == \"otel\" {\n\t\t// Use default params\n\t\treturn params, nil\n\t}\n\n\ttraceOutput, _, _ := strings.Cut(line, \"=\")\n\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}","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/lib/trace/otel.go#L162-L198","documentation":"The -o/--traces-output value does not start with 'otel' (the only supported traces output). The config line is cut at the first '=' and the prefix checked; anything other than the literal 'otel' (or the bare 'otel' short form) wraps ErrInvalidTracesOutput with the offending prefix quoted in the message.","triggerScenarios":"Thrown at internal/lib/trace/otel.go:180 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use -o otel or -o otel=key=value,... for OTLP trace export","Remove the unsupported output name shown in the error","Check for typos and leading whitespace in the output option"],"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"}