{"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/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/cmd/outputs.go#L39-L75","documentation":"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.","triggerScenarios":"Running k6 >= v0.55.0 with `--out statsd`, `K6_OUT=statsd`, or statsd left in an outputs list of a wrapper/config after upgrading.","commonSituations":"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.","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)."],"exampleFix":"# before\nk6 run --out statsd script.js\n# after\nxk6 build --with github.com/LeonAdato/xk6-output-statsd\n./k6 run --out statsd script.js","handlingStrategy":"validation","validationCode":"# guard CI before upgrading past k6 v0.55.0\nif grep -rnE -- '--out statsd|K6_OUT=statsd|K6_STATSD_' ci/ scripts/ 2>/dev/null; then\n  echo 'statsd output removed in k6 v0.55.0 - migrate to xk6-output-statsd first'\n  exit 1\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["statsd","output","deprecation","removed-feature","xk6","cli"],"backgroundTag":"deprecated-output-removed","analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":"2026-08-18T03:05:52.393Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}