Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag web vitals metrics to have more fine grained querying #862

Closed
2 tasks
ankur22 opened this issue Apr 26, 2023 · 1 comment
Closed
2 tasks

Tag web vitals metrics to have more fine grained querying #862

ankur22 opened this issue Apr 26, 2023 · 1 comment
Labels
enhancement New feature or request team/k6browser To distinguish the issue on project boards.
Milestone

Comments

@ankur22
Copy link
Collaborator

ankur22 commented Apr 26, 2023

When web vital metrics are emitted, xk6-browser is currently tagging them with the URL. This allows anyone to query the emitted metrics and find the web vital metrics for specific urls. In most cases this is probably good enough.

We would like to extend the implementation of how web vital metrics are emitted to allow us to do two things:

  1. query them so that we can display them in a timeline.
  2. query them so that we can group "related" navigations.

Query them so that we can display them in a timeline

Let's say I have a test which is doing the following steps:

  1. goto (https://test.k6.io/my_messages.php)
  2. fill username and password
  3. click login
  4. Page navigates to the same url but this time the messages load (https://test.k6.io/my_messages.php)

This test visits the same url twice, but the state changes between the two navigations, which means that the web vital metrics will differ between the two. At the moment there isn't a simple way to group the two sets of web vital metrics which were emitted when visiting the same url.

The task here is to find a way to group the web vital metrics so that anyone can query the metrics based on an attribute that denotes an order in time. E.g.:

url metric value order
https://test.k6.io/my_messages.php web_vital_cls 0.45 0
https://test.k6.io/my_messages.php web_vital_lcp 200 0
https://test.k6.io/my_messages.php web_vital_fid 300 0
https://test.k6.io/my_messages.php web_vital_cls 0.45 1
https://test.k6.io/my_messages.php web_vital_lcp 600 1
https://test.k6.io/my_messages.php web_vital_fid 400 1

Query them so that we can group "related" navigations

Now let's work with the following example:

  1. Goto to navigate to test.k6.io;
  2. Click to navigate to /my_messages.php;
  3. Goto to navigate to test.k6.io;
  4. Click to navigate to /news.php;
  5. etc.

After being able to query the web vital metrics so that we can pull them based on an attribute that denotes an order in time, we would next like to group them based on "related" navigations. What I mean by that is we would like to display the top level goto actions and under them the other navigations that have occurred due to other actions (such as clicking on a button or link).

Tasks

Tasks

@ankur22 ankur22 added this to the v0.10.0 milestone Apr 26, 2023
@ankur22 ankur22 added feature A new feature team/k6browser To distinguish the issue on project boards. enhancement New feature or request and removed feature A new feature labels Apr 26, 2023
@inancgumus
Copy link
Member

We now have a better idea of the problem. We can close it and recreate a new issue if needed after the investigation.

@inancgumus inancgumus closed this as not planned Won't fix, can't repro, duplicate, stale Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request team/k6browser To distinguish the issue on project boards.
Projects
None yet
Development

No branches or pull requests

2 participants