-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Abort test on reaching metric limit #3861
Comments
This mostly leads to #3198, where you can send the metrics to external metric storages, and you can set a threshold on a specific query. When the query crosses the threshold then the test is stopped by aborted by threshold if abort-on-failure option is set. We don't have it in our short-term roadmap, so if you need it immediately then you can do it autonomously reproducing the same concept by building an Output extension. |
@codebien |
@ameetpal Yes, you can. Your output has to implement WithTestRunStop interface, then k6 passes on startup will call this function to pass the function to call when you want to abort. Let we know if something isn't clear. |
Feature Description
As of now following warning pops up when there are large number of urls in test
oi.logger.Warnf( "The test has generated metrics with %d unique time series, "+ "which is higher than the suggested limit of %d "+ "and could cause high memory usage. "+ "Consider not using high-cardinality values like unique IDs as metric tags "+ "or, if you need them in the URL, use the name metric tag or URL grouping. "+ "See https://grafana.com/docs/k6/latest/using-k6/tags-and-groups/ for details.", oi.cardinality.Count(), timeSeriesFirstLimit, )
Other than warning there should be an option to abort test when we see this warning, As this is causing high memory usage.
Suggested Solution (optional)
An K6 environment variable to stop test when this limit is reached
Already existing or connected issues / PRs (optional)
No response
The text was updated successfully, but these errors were encountered: