{"record":{"id":"c79a2cc0762c495b","repo":"grafana/k6","slug":"the-datadog-output-was-deprecated-in-k6-v0-32-0-an","errorCode":null,"errorMessage":"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","messagePattern":"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","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/cmd/outputs.go","lineNumber":63,"sourceCode":"func 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\n\t\t\t\t\"opentelemetry\", \"experimental-opentelemetry\")\n\t\t\treturn opentelemetry.New(params)\n\t\t},\n\t\tbuiltinOutputOpentelemetry.String(): func(params output.Params) (output.Output, error) {\n\t\t\treturn opentelemetry.New(params)\n\t\t},","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/cmd/outputs.go#L45-L81","documentation":"k6 removed the built-in Datadog output; the constructor stub in getAllOutputConstructors (internal/cmd/outputs.go:63) always fails. It was deprecated in v0.32.0 and removed in v0.34.0. The error message names two replacements: the xk6 statsd extension in DogStatsD mode, or k6's OpenTelemetry output pointed at a Datadog OTLP endpoint.","triggerScenarios":"Running k6 >= v0.34.0 with `--out datadog` or `K6_OUT=datadog`, including legacy `K6_DATADOG_*` env configuration that silently implies the output.","commonSituations":"Old monitoring setups shipping k6 metrics to Datadog via the native output being upgraded; copied `--out datadog` examples from pre-2021 docs.","solutions":["Remove `--out datadog` / `K6_OUT=datadog` and the `K6_DATADOG_*` variables.","Build k6 with the statsd extension and enable tags: `xk6 build --with github.com/LeonAdato/xk6-output-statsd`, run with `--out statsd` and `K6_STATSD_ENABLE_TAGS=true`, pointing at a DogStatsD endpoint.","Or use `--out experimental-opentelemetry` with the OTLP exporter configured for Datadog intake."],"exampleFix":"# before\nk6 run --out datadog script.js\n# after (statsd extension in DogStatsD mode)\nxk6 build --with github.com/LeonAdato/xk6-output-statsd\nK6_STATSD_ENABLE_TAGS=true ./k6 run --out statsd script.js","handlingStrategy":"validation","validationCode":"# guard CI before upgrading k6 past v0.34.0\nif grep -rnE -- '--out datadog|K6_OUT=datadog|K6_DATADOG_' ci/ scripts/ 2>/dev/null; then\n  echo 'datadog output removed - migrate to xk6 statsd extension (K6_STATSD_ENABLE_TAGS=true) or OTLP'\n  exit 1\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Alert on any K6_DATADOG_* env vars surviving in secret managers after migration.","When moving to Datadog via OTLP, validate the endpoint with --out experimental-opentelemetry in staging first."],"tags":["datadog","statsd","output","deprecation","opentelemetry","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"}