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.
10 Mar 2025 04:46 PM
I'm a Dynatrace administrator and not highly familiar with k6... Having said that, thank you for what you have so far.
I had a tester do all the config and upload the dashboard into the "new" dashboard app. Looking at the metrics, I don't see expected dimensions. Is there an intention to make this compatible with metrics on GRAIL so dimensions appear there?
Is there an intention to enable some sort of filtering in dashboards so if we have multiple k6 runs with multiple teams, they can filter their specific results?