I use k6 on my local machine to perform load-testing as well as a Datadog agent to visualize the metrics in Datadog.
I'd like to filter k6 metrics in Datadog as the tests aren't distinguishable.
At this point the $test_run_id
only shows *
(refer to the screenshot below):
I followed this the official doc that suggests to set include_test_run_id
flag to true
in k6 config, but I was unsuccessful.
Here's a k6 config I currently use (<YOUR_DATADOG_API_KEY>
is replaced with an actual Datadog API key):
export const options = {
vus: 5,
duration: "10s",
noConnectionReuse: true,
ext: {
loadimpact: {
apm: [
{
provider: "datadog",
api_key: "<YOUR_DATADOG_API_KEY>",
include_test_run_id: true
}
]
}
}
};