You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we have the ability to support custom tags in k6 core when using http.get() or http.post(). This allows us to customise reports, thresholds or other use cases. See the below code snippet for reference.
This is currently not supported in xk6-browser specific methods such as page.goto(). I have a use case where I want to specify different thresholds per pages and the easiest way is to use tags like the one below:
export const options = {
...
thresholds: {
'browser_dom_content_loaded{customTag:messages}': ['p(90) < 1000'],
'browser_dom_content_loaded{customTag:news}': ['p(90) < 800'],
browser_first_contentful_paint: ['max < 1000']
}
};
export function messages() {
/// some other code
page.goto('https://test.k6.io/my_messages.php', {
// This custom tag doesn't work as expected
tags: { customTag: 'messages' },
waitUntil: 'networkidle'
})
}
There are other ways of course to specify different thresholds such as filtering it by default tags such as url or the name metric but it would still be nice to support custom tags going forward.
Hi @imiric, it would be really nice to have such improvement. I also saw that it is confusing and difficult to deal with name metrics etc. Is there any decision made or progress on this issue? Thanks for your answer.
@inancgumus we need to look into this still. It's unrelated to grafana/xk6-browser#371. It is related to tagging metrics with custom tags. At the moment the browser module will tag metrics here, here and here, whereas with this issue it is wanting to add custom tags when working with our APIs e.g. page.goto. I'm not sure what the outcome of tagging page.goto will be though, will it tag only the page.goto related metrics, or all metrics for the page that it navigates to, or are there other options? We need to investigate and compare with k6's approach.
Currently, we have the ability to support custom tags in k6 core when using
http.get()
orhttp.post()
. This allows us to customise reports, thresholds or other use cases. See the below code snippet for reference.This is currently not supported in xk6-browser specific methods such as
page.goto()
. I have a use case where I want to specify different thresholds per pages and the easiest way is to use tags like the one below:There are other ways of course to specify different thresholds such as filtering it by default tags such as
url
or thename
metric but it would still be nice to support custom tags going forward.Resources
Tasks
The text was updated successfully, but these errors were encountered: