grafana/k6 · error
the datadog output was deprecated in k6 v0.32.0 and removed
Error message
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
What it means
Thrown when the CLI resolves the built-in 'datadog' output type. The Datadog output was deprecated in k6 v0.32.0 and its implementation removed in v0.34.0; the output registry in internal/cmd/outputs.go now maps builtinOutputDatadog to a constructor that unconditionally returns this error.
Source
Thrown at internal/cmd/outputs.go:63
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.",
"opentelemetry", "experimental-opentelemetry")
return opentelemetry.New(params)
},
builtinOutputOpentelemetry.String(): func(params output.Params) (output.Output, error) {
return opentelemetry.New(params)
},View on GitHub (pinned to 93accf6570)
Solutions
- Build k6 with the statsd extension (`xk6 build --with github.com/LeonAdato/xk6-output-statsd`) and run with `--out statsd` plus K6_STATSD_ENABLE_TAGS=true so Datadog tags are forwarded
- Or use the OpenTelemetry output (`--out opentelemetry`, formerly experimental) behind an OTel collector that exports to Datadog
- Remove `--out datadog` / K6_OUT=datadog from scripts, CI env, and stored configs
Example fix
# before k6 run --out datadog script.js # after xk6 build --with github.com/LeonAdato/xk6-output-statsd K6_STATSD_ENABLE_TAGS=true ./k6 run --out statsd script.js
Defensive patterns
Strategy: validation
Validate before calling
# pre-flight: fail fast on removed output names before wasting a run if grep -qE '(^|, )(datadog|statsd|kafka)(,|$)' <<< "$K6_OUT" || echo "$@" | grep -qE '--out (datadog|statsd|kafka)'; then echo "ERROR: datadog/statsd/kafka builtin outputs were removed in k6 v0.34.0/v0.55.0; use xk6 extensions" >&2 exit 1 fi
Prevention
- Pin and document the k6 version in CI so removed outputs fail predictably
- Grep pipelines and stored configs for `--out datadog|statsd|kafka` after every k6 upgrade
- Build the binary with the extensions you need via xk6 and record it in a Dockerfile
When it happens
Trigger: Running `k6 run --out datadog script.js`, or setting K6_OUT=datadog / listing 'datadog' in the outputs config, on any k6 >= v0.34.0.
Common situations: CI pipelines, wrapper scripts, or archived configs written for k6 <= v0.33 still passing --out datadog after a k6 upgrade; docs/blog examples that predate the removal.
Related errors
- the kafka output was deprecated in k6 v0.32.0 and removed in
- the statsd output was deprecated in k6 v0.47.0 and removed i
- k6/experimental/redis has been removed. Please migrate to th
- k6/experimental/browser has been graduated, please use k6/br
- k6/experimental/grpc has been graduated, please use k6/net/g
AI-assisted analysis of grafana/k6@93accf6570 (2026-08-15).
Data as JSON: /api/errors/c79a2cc0762c495b.
Report an issue: GitHub.