The built-in StatsD output has been deprecated on k6 v0.47.0. You can continue to use this feature by using the xk6-output-statsd extension, and this guide has been updated to include instructions for how to use it.
For more information on the reason behind this change, you can follow this issue in the k6 repository.
xk6 will create the k6 binary in the local folder.
To learn more about how to build custom k6 versions, check out xk6.
Using the k6 binary you built in the previous step, you can use the --out output-statsd option when running your tests to use this extension:
The following options can be configured:
|Address of the statsd service, currently only UDP is supported. The default value is localhost:8125.
|The namespace used as a prefix for all the metric names. The default value is k6.
|Configure how often data batches are sent. The default value is 1s.
|The buffer size. The default value is 20.
|If true enables sending tags. false by default as old versions of statsd, prior to v0.9.0 did not support tags.
|This is a comma-separated list of tags that should NOT be sent to statsd. For example, "tag1,tag2". The default value is vu,iter,url.