10 Jul 2024 10:50 AM - edited 10 Jul 2024 11:12 AM
K6 emits several key load test health metrics during runtime. Use this integration to send this data into Dynatrace. Then, deploy the provided dashboard to visualize these key metrics for your load tests.
k6 requires that you build a custom binary using their xk6
tool.
To build k6 binary with the Prometheus remote write output extension use:
xk6 build --with github.com/Dynatrace/xk6-output-dynatrace@latest
The API token needs "Ingest metrics" metrics.ingest
permission.
export K6_DYNATRACE_URL=http://<environmentid>.live.dynatrace.com
export K6_DYNATRACE_APITOKEN=<Dynatrace API token>
./k6 run script.js -o output-dynatrace
The metrics will be available via the "Metrics" page during the load test.
You may also wish to upload this prebuilt dashboard.