{"record":{"id":"4887d44825db12e3","repo":"grafana/k6","slug":"the-statsd-output-was-deprecated-in-k6-v0-47-0-and","errorCode":null,"errorMessage":"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","messagePattern":"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","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/cmd/outputs.go","lineNumber":57,"sourceCode":"\tbuiltinOutputExperimentalOpentelemetry\n\tbuiltinOutputOpentelemetry\n\tbuiltinOutputSummary\n)\n\n// TODO: move this to an output sub-module after we get rid of the old collectors?\nfunc getAllOutputConstructors() (map[string]output.Constructor, error) {\n\t// Start with the built-in outputs\n\tresult := map[string]output.Constructor{\n\t\tbuiltinOutputJSON.String():     json.New,\n\t\tbuiltinOutputCloud.String():    cloud.New,\n\t\tbuiltinOutputCSV.String():      csv.New,\n\t\tbuiltinOutputInfluxdb.String(): influxdb.New,\n\t\tbuiltinOutputKafka.String(): func(_ output.Params) (output.Output, error) {\n\t\t\treturn nil, errors.New(\"the kafka output was deprecated in k6 v0.32.0 and removed in k6 v0.34.0, \" +\n\t\t\t\t\"please use the new xk6 kafka output extension instead - https://github.com/k6io/xk6-output-kafka\")\n\t\t},\n\t\tbuiltinOutputStatsd.String(): func(_ output.Params) (output.Output, error) {\n\t\t\treturn nil, errors.New(\"the statsd output was deprecated in k6 v0.47.0 and removed in k6 v0.55.0, \" +\n\t\t\t\t\"please use the new xk6 statsd output extension instead. \" +\n\t\t\t\t\"It can be found at https://github.com/LeonAdato/xk6-output-statsd and \" +\n\t\t\t\t\"more info at https://github.com/grafana/k6/issues/2982\")\n\t\t},\n\t\tbuiltinOutputDatadog.String(): func(_ output.Params) (output.Output, error) {\n\t\t\treturn nil, errors.New(\"the datadog output was deprecated in k6 v0.32.0 and removed in k6 v0.34.0, \" +\n\t\t\t\t\"please use the statsd output extension https://github.com/LeonAdato/xk6-output-statsd with environment \" +\n\t\t\t\t\"variable K6_STATSD_ENABLE_TAGS=true or an experimental opentelemetry output instead\",\n\t\t\t)\n\t\t},\n\t\tbuiltinOutputExperimentalPrometheusRW.String(): func(params output.Params) (output.Output, error) {\n\t\t\treturn remotewrite.New(params)\n\t\t},\n\t\t\"web-dashboard\": dashboard.New,\n\t\tbuiltinOutputExperimentalOpentelemetry.String(): func(params output.Params) (output.Output, error) {\n\t\t\tparams.Logger.Warnf(\"OpenTelemetry output has been graduated as a stable output.\"+\n\t\t\t\t\"You can now use just %q instead of %q. The experimental version will be removed in future versions.\",\n","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/grafana/k6/blob/93accf6570dcd306ca5e99cc44c393ee3797761b/internal/cmd/outputs.go#L39-L75","documentation":"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.","triggerScenarios":"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'.","commonSituations":"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.","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"],"exampleFix":"# before\nk6 run --out statsd script.js   # ERR: statsd output removed in v0.55.0\n\n# after\nxk6 build --with github.com/LeonAdato/xk6-output-statsd\n./k6 run --out statsd script.js   # extension-provided output","handlingStrategy":"fallback","validationCode":"# fail fast on removed outputs in CI\nfor o in $(echo \"${K6_OUT:-}\" | tr ',' ' '); do\n  case \"$o\" in statsd) echo \"statsd output removed in v0.55: use xk6-output-statsd\" >&2; exit 1 ;; esac\ndone","typeGuard":null,"tryCatchPattern":"outputs := strings.Split(cfg.Out, \",\")\nfor _, o := range outputs {\n    if strings.TrimSpace(o) == \"statsd\" {\n        // stub constructor returns the removal error; route the user to\n        // github.com/LeonAdato/xk6-output-statsd or the OTel output instead\n        return errors.New(\"statsd output removed in k6 v0.55.0; build k6 with the xk6-output-statsd extension\")\n    }\n}","preventionTips":["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"],"tags":["output","statsd","deprecated","removed","migration","cli"],"backgroundTag":null,"analyzedSha":"93accf6570dcd306ca5e99cc44c393ee3797761b","analyzedAt":"2026-08-15T21:23:27.118Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}