grafana/k6 · error
unexpected output extension type %T
Error message
unexpected output extension type %T
What it means
Internal error in getAllOutputConstructors: an extension retrieved from the ext.OutputExtension registry has an unexpected concrete type that cannot be cast to an output constructor. This indicates a broken/incompatible extension build, not user input.
Solutions
- Rebuild or update the k6 binary with a compatible version of the offending extension
- Report the incompatibility to the extension maintainers
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at internal/cmd/outputs.go:91 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of grafana/k6@01ffac6f24 (2026-08-18).
Data as JSON: /api/errors/46f8f6760abb2ccc.
Report an issue: GitHub.
Appendix: source
Thrown at internal/cmd/outputs.go:91
params.Logger.Warnf("OpenTelemetry output has been graduated as a stable output."+
"You can now use just %q instead of %q. The experimental version will be removed in future versions.",
"opentelemetry", "experimental-opentelemetry")
return opentelemetry.New(params)
},
builtinOutputOpentelemetry.String(): func(params output.Params) (output.Output, error) {
return opentelemetry.New(params)
},
}
exts := ext.Get(ext.OutputExtension)
for _, e := range exts {
if _, ok := result[e.Name]; ok {
return nil, fmt.Errorf("invalid output extension %s, built-in output with the same type already exists", e.Name)
}
m, ok := e.Module.(output.Constructor)
if !ok {
return nil, fmt.Errorf("unexpected output extension type %T", e.Module)
}
result[e.Name] = m
}
return result, nil
}
func getPossibleIDList(constrs map[string]output.Constructor) string {
res := make([]string, 0, len(constrs))
for k := range constrs {
if k == "kafka" || k == "datadog" {
continue
}
res = append(res, k)
}
sort.Strings(res)
return strings.Join(res, ", ")
}View on GitHub (pinned to 01ffac6f24)