Xk6-browser - InfluxDB - Group by URL?


I tried to use xk6-browser with influxDB 1.8 and Grafana integration, and I have troubles with a table that shows list of http queries.

If we do “http.get” classic method, url of endpoint is in “name” attribute, but in case of xk6-browser, url is in “url” attribute. And I don’t know how I can group by this url, it seems not working:

SELECT count(*) FROM “http_req_duration” WHERE $timeFilter GROUP BY “url”,“status”,“method” fill(null)

“url” column is empty on this query.

But, if I use this query:
SELECT url, status, method FROM “http_req_duration” WHERE $timeFilter

Everything is nice… I have right values.

Can you please help me?

I’m trying to show a table, that is grouped by url/status/method and average of P95/P99 on each lines…

Thank you for your help!


It seems to be an issue with TAG and FIELD items?
“url” is a field, and “name” is a tag. I can GROUP BY on tag, but not on field?

Maybe it is a bug? Why name doesn’t contain the url value when using xk6-browser?

Thank you for your help!

Hi @Selven

You can refer this post - Xk6--browser - How to get metrics for different page - #6 by vish_s02 - k6-browser - Grafana Labs Community Forums

and then can use queries as -

SELECT “url”, “value” FROM “browser_loaded” WHERE $timeFilter


SELECT “url”, “value” FROM “browser_first_meaningful_paint” WHERE $timeFilter

And use transformation -

Finally you will se results like

1 Like