Allow more flexible sub-metrics and better UX in thresholds #1313
Labels
enhancement
evaluation needed
proposal needs to be validated or tested before fully implementing it in k6
feature
ux
Currently, you can define thresholds on subsets of the metric data points that have specific tag values, like this:
However, there's no way to be able to specify more complex matching queries that use something besides "equals" and "and". For example, it seems useful to be able to specify something like "the number of HTTP requests with a non-200 status" or "URLs starting with
https://www.somesite.com/whatever
", etc..Needless to say, but this should probably be implemented after we refactor the thresholds to have sane parsing (#961). #1298 is something we should also consider when we decide exactly how to implement this - for example, we should be able to specify thresholds only for 403 responses that were not intended.
Additionally, we should think about refactoring how we configure thresholds. Stuffing complex matching logic in the JSON key seems to be the wrong way to go about it, even now... It may also be worth introducing some JS config-helper functions for whatever we decide, if we can provide a cleaner API that way.
The text was updated successfully, but these errors were encountered: