grafana/k6 · error
the statsd output was deprecated in k6 v0.47.0 and removed…
Error message
the statsd output was deprecated in k6 v0.47.0 and removed in k6 v0.55.0, please use the new xk6 statsd output extension instead. It can be found at https://github.com/LeonAdato/xk6-output-statsd and more info at https://github.com/grafana/k6/issues/2982
What it means
k6 removed the built-in statsd output. Its constructor in getAllOutputConstructors (internal/cmd/outputs.go:57) always returns this error instead of an output. Statsd emission was deprecated in v0.47.0 and removed in v0.55.0; the message redirects to the community xk6-output-statsd extension.
Solutions
- Remove `--out statsd` / `K6_OUT=statsd` from the invocation.
- Build an extended binary: `xk6 build --with github.com/LeonAdato/xk6-output-statsd` and use `--out statsd` with it.
- If the target is Datadog, note the statsd extension supports tags via `K6_STATSD_ENABLE_TAGS=true` (see the linked issue grafana/k6#2982).
Example fix
# before k6 run --out statsd script.js # after xk6 build --with github.com/LeonAdato/xk6-output-statsd ./k6 run --out statsd script.js
Defensive patterns
Strategy: validation
Validate before calling
# guard CI before upgrading past k6 v0.55.0 if grep -rnE -- '--out statsd|K6_OUT=statsd|K6_STATSD_' ci/ scripts/ 2>/dev/null; then echo 'statsd output removed in k6 v0.55.0 - migrate to xk6-output-statsd first' exit 1 fi
Prevention
- Track k6 deprecation warnings in logs — statsd printed warnings for many versions before removal.
- Keep a mapping doc of output name -> owning extension so migrations are mechanical.
- Test upgraded k6 binaries against the full production command line in a staging job.
When it happens
Trigger: Running k6 >= v0.55.0 with `--out statsd`, `K6_OUT=statsd`, or statsd left in an outputs list of a wrapper/config after upgrading.
Common situations: Docker images or Helm charts pinned to old k6 versions being upgraded to v0.55+; scripts that reported to StatsD/Telegraf/DogStatsD via `--out statsd` during migration to extensions; leftover `K6_OUT` env vars in CI.
Related errors
- the kafka output was deprecated in k6 v0.32.0 and removed…
- the datadog output was deprecated in k6 v0.32.0 and removed…
- default stack configured but the default project ID is not…
- failed to encode load zone list
- influxdb's ConcurrentWrites must be a positive number
AI-assisted analysis of grafana/k6@01ffac6f24 (2026-08-18).
Data as JSON: /api/errors/4887d44825db12e3.
Report an issue: GitHub.
Appendix: source
Thrown at internal/cmd/outputs.go:57
builtinOutputExperimentalOpentelemetry
builtinOutputOpentelemetry
builtinOutputSummary
)
// TODO: move this to an output sub-module after we get rid of the old collectors?
func getAllOutputConstructors() (map[string]output.Constructor, error) {
// Start with the built-in outputs
result := map[string]output.Constructor{
builtinOutputJSON.String(): json.New,
builtinOutputCloud.String(): cloud.New,
builtinOutputCSV.String(): csv.New,
builtinOutputInfluxdb.String(): influxdb.New,
builtinOutputKafka.String(): func(_ output.Params) (output.Output, error) {
return nil, errors.New("the kafka output was deprecated in k6 v0.32.0 and removed in k6 v0.34.0, " +
"please use the new xk6 kafka output extension instead - https://github.com/k6io/xk6-output-kafka")
},
builtinOutputStatsd.String(): func(_ output.Params) (output.Output, error) {
return nil, errors.New("the statsd output was deprecated in k6 v0.47.0 and removed in k6 v0.55.0, " +
"please use the new xk6 statsd output extension instead. " +
"It can be found at https://github.com/LeonAdato/xk6-output-statsd and " +
"more info at https://github.com/grafana/k6/issues/2982")
},
builtinOutputDatadog.String(): func(_ output.Params) (output.Output, error) {
return nil, errors.New("the datadog output was deprecated in k6 v0.32.0 and removed in k6 v0.34.0, " +
"please use the statsd output extension https://github.com/LeonAdato/xk6-output-statsd with environment " +
"variable K6_STATSD_ENABLE_TAGS=true or an experimental opentelemetry output instead",
)
},
builtinOutputExperimentalPrometheusRW.String(): func(params output.Params) (output.Output, error) {
return remotewrite.New(params)
},
"web-dashboard": dashboard.New,
builtinOutputExperimentalOpentelemetry.String(): func(params output.Params) (output.Output, error) {
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.",
View on GitHub (pinned to 01ffac6f24)