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

Introduce Global matching pattern for URL within thresholds #3174

Open
ArturSuchowierski opened this issue Jul 6, 2023 · 1 comment
Open
Labels
evaluation needed proposal needs to be validated or tested before fully implementing it in k6 feature

Comments

@ArturSuchowierski
Copy link

ArturSuchowierski commented Jul 6, 2023

Feature Description

Global matching pattern is widely used across different automation tools, i.e. Cypress

cy.intercept({ method: 'PUT', url: '**/users/*' })

It would also bring benefit in terms of flexibility, when introduced to current k6 threshold url matching mechanism

We're now able to work with following url threshold:
thresholds: { ‘webvital_largest_content_paint{url:www.example-url.com/somepage/someinneresource/page.html’ : [‘p(90) < 2500’], },

But this one isn't supported yet:

thresholds: { ‘webvital_largest_content_paint{url:www.example-url.com/**’ : [‘p(90) < 2500’], },

So for the case when particular URL is changing, i.e maybe including some token ID, or any other dynamic query string it wouldn't be possible to gather k6 metrics for following threshold based on global matched url

Suggested Solution (optional)

No response

Already existing or connected issues / PRs (optional)

No response

@mstoykov
Copy link
Contributor

Hi @ArturSuchowierski, sorry for the slow reply 🙇 .

I did start writing #3198 around this with the idea to answer you after it, but forgot about it :(.

What you are asking is not impossible and currently ... likely not even all that hard to implement. I would argue thought the it will likely not scale great.

As the other issues explains the current threshold syntax, format and functionality is kind of basic and is a thing that is k6 specific. There are bunch of different things going on and many different issues with it.

I personally don't think that we will fix one single issue first as arguably the whole syntax/format has problems. So arguably we either

  1. won't do anything to thresholds - what we have been doing for years.
  2. completely redo them to fit everything we want, which arguably will be implementing promql and the underlying storage, which ... I kind of don't want to do 😬
  3. Or 3 I guess work External Threshold #3198

I am leaving this open for more discussions and am adding "evaluation needed"

@mstoykov mstoykov added the evaluation needed proposal needs to be validated or tested before fully implementing it in k6 label Aug 22, 2023
@mstoykov mstoykov removed their assignment Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
evaluation needed proposal needs to be validated or tested before fully implementing it in k6 feature
Projects
None yet
Development

No branches or pull requests

2 participants