grafana/k6 · error
the statsd output was deprecated in k6 v0.47.0 and removed i
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
Returned by the output constructor registry when 'statsd' is requested: the built-in statsd output was deprecated in k6 v0.47.0 and removed in v0.55.0, replaced by a community-maintained xk6 extension. As with kafka, the stub constructor exists solely to explain the removal and point to the replacement.
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 93accf6570)
Solutions
- Build k6 with the extension: xk6 build --with github.com/LeonAdato/xk6-output-statsd and keep using --out statsd with its env config
- For Datadog specifically, consider the suggested alternatives in the message: statsd extension with K6_STATSD_ENABLE_TAGS=true, or the experimental OpenTelemetry output
- Remove statsd from K6_OUT / --out until the extension binary is in place
Example fix
# before k6 run --out statsd script.js # ERR: statsd output removed in v0.55.0 # after xk6 build --with github.com/LeonAdato/xk6-output-statsd ./k6 run --out statsd script.js # extension-provided output
Defensive patterns
Strategy: fallback
Validate before calling
# fail fast on removed outputs in CI
for o in $(echo "${K6_OUT:-}" | tr ',' ' '); do
case "$o" in statsd) echo "statsd output removed in v0.55: use xk6-output-statsd" >&2; exit 1 ;; esac
done Try / catch
outputs := strings.Split(cfg.Out, ",")
for _, o := range outputs {
if strings.TrimSpace(o) == "statsd" {
// stub constructor returns the removal error; route the user to
// github.com/LeonAdato/xk6-output-statsd or the OTel output instead
return errors.New("statsd output removed in k6 v0.55.0; build k6 with the xk6-output-statsd extension")
}
} Prevention
- Before upgrading to k6 >= v0.55, replace --out statsd with the xk6-output-statsd extension build
- For Datadog, evaluate the experimental OpenTelemetry output as a supported replacement
- Pin k6 versions in CI so removals surface in a controlled upgrade, not mid-deploy
When it happens
Trigger: Running any command with --out statsd or K6_OUT=statsd on k6 >= v0.55.0; old configs combining statsd with K6_STATSD_* env variables; archived tests whose outputs list includes 'statsd'.
Common situations: Teams upgrading k6 across the v0.55 boundary with existing statsd-based monitoring (Datadog/Telegraf setups); CI images updated to new k6 while env still sets K6_OUT=statsd; the error text itself suggests the LeonAdato xk6-output-statsd extension as the successor.
Related errors
- the kafka output was deprecated in k6 v0.32.0 and removed in
- the datadog output was deprecated in k6 v0.32.0 and removed
- Run `k6 cloud login` to authenticate, or check the docs for
- access token not configured
- no project specified. Use --project-id, set K6_CLOUD_PROJECT
AI-assisted analysis of grafana/k6@93accf6570 (2026-08-15).
Data as JSON: /api/errors/4887d44825db12e3.
Report an issue: GitHub.