Environment: Windows 11
I executed this on WSL2 (because I dont know of the equivalent windows command for the following) =>
DOCKER_CONTENT_TRUST=1 \
docker run --rm -d \
--name datadog2 \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /proc/:/host/proc/:ro \
-v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \
-e DD_SITE="datadoghq.com" \
-e DD_API_KEY=<API_KEY> \
-e DD_DOGSTATSD_NON_LOCAL_TRAFFIC=1 \
-p 8125:8125/udp \
datadog/agent:latest
The test (script.js) I used was the following
import http from 'k6/http'
import { check } from 'k6'
export default function () {
const url = 'https://httpbin.test.k6.io/post'
const response = http.post(url, 'Hello world!')
check(response, {
'Application says hello': (r) => r.body !== null && r.body.includes('Hello world!'),
})
}
I then executed the following command to run the test (I’m using powershell)
$env:K6_STATSD_ENABLE_TAGS=true
k6 run --out statsd script.js
Which didn’t work, the test executed successfully but I didn’t see any data coming through into DataDog
I then tried to execute the following command
$env:K6_STATSD_ENABLE_TAGS=true
$env:K6_DATADOG_ADD=172.17.0.2:8125
k6 run --out statsd script.js
And still didn’t work see any data coming through into DataDog. Is there a different set of instructions for Windows?