K6_STATSD_ENABLE_TAGS not recognised

Trying to run:
K6_STATSD_ENABLE_TAGS=true k6 run --out statsd script.js

‘K6_STATSD_ENABLE_TAGS’ is not recognized as an internal or external command, operable program or batch file.
in command prompt

K6_STATSD_ENABLE_TAGS=true : The term ‘K6_STATSD_ENABLE_TAGS=true’ is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
in powershell

I am running K6 CLI on windows locally.
What am I missing?

So what this was intended to be is 2 separate commands in PS:
and then
k6 run --out statsd script.js

nope, it should be run like this:
K6_STATSD_ENABLE_TAGS=true k6 run --out statsd ./script.js

Hi @zakkra,

I think on windows what you are doing is what needs to be done, but our instructions are probably only about UNIX shells.

Can you link us where you found these instructions?

I didn’t find any instructions but worked out what this was meant to do: 1 - set environment variable to true, 2 - run the test

This worked for me when running DataDog Agent on Docker Desktop locally