Here is my flow:
K6 run -o cloud xx.js (K6 cloud results are good) ===> Prometheus ===> Grafana cloud
Below steps worked on to make my load test results visible on grafana cloud:
-
I have javascript that works fine for k6 local and cloud to publish results. for prometheus i have added below sample code.
-
I have updated K6 → Cloud APM configuration for prometheus
-
also, added grafana cloud with “prometheus details”
-
Added new data source to grafana and made sure data source is working with basic authentication.
export const options = {
ext: {
loadimpact: {
apm: [
{
provider: 'prometheus',
remoteWriteURL: '<Remote Write URL>',
// optional parameters
credentials: {
username: '<user>',
password: '<token>'
},
includeDefaultMetrics: true,
metrics: ['http_req_sending', 'my_rate', 'my_gauge'], //...other options,
includeTestRunId: false,
resampleRate: 3,
},
],
},
},
};
Result: I am not seeing prometheus as per below screen shot from my k6 cloud account… also, grafana with prometheus dashboard don’t saw anything.