grafana / xk6-browser

The browser module adds support for browser automation and end-to-end web testing via the Chrome Devtools Protocol to k6.
https://grafana.com/docs/k6/latest/javascript-api/k6-browser/
GNU Affero General Public License v3.0
344 stars 41 forks source link

Link all requests to the page #1445

Open ankur22 opened 2 months ago

ankur22 commented 2 months ago

Feature Description

When a page navigates to a website, it will perform other resource requests to retrieve JS files, images etc. We are tracking each request as a metric in the form of browser_http_req_duration, browser_http_req_failed, browser_data_received and browser_data_sent. This is done here and here.

The issue is that we cannot link these metrics to the originating page. We need to find a way to link them with a shared id or page url. Issue with the page url is that the url for different pages could all be the same, so an id is preferred.

Suggested Solution (optional)

Already existing or connected issues / PRs (optional)

https://github.com/grafana/k6/issues/2728