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

Add support to export Thresholds #28

Open
xendren opened this issue Jun 23, 2022 · 2 comments
Open

Add support to export Thresholds #28

xendren opened this issue Jun 23, 2022 · 2 comments
Labels
enhancement New feature or request evaluation needed

Comments

@xendren
Copy link

xendren commented Jun 23, 2022

With K6, using thresholds to indicate potential issues with load is a common practice with the load testing. Looking at the k6 summary in our logs, show whether the thresholds passed or failed. When using the prometheus output, the thresholds are not pushed up into prometheus, or at least we are not able to find them. This seems to be a big piece of testing information that is missing if we choose to output to Prometheus. We did try using the xk6-output-timescaledb output, and it writes the information to a thresholds table that is used in the sample dashboard. We prefer using PromQL, so we would like to be able to see the thresholds in Grafana. I believe we can manually setup thresholds in the dashboard, but that would be a static threshold that can't be defined in our k6 test script or option file. Are we missing something obvious, or are there plans to add thresholds in the future?

@codebien
Copy link
Contributor

Hi @xendren,
you're right, at the moment the Prometheus remote write output doesn't support the Thresholds export. In the future, we could add this feature making Prometheus rw output aligned with the TimescaleDB's feature set.

How do you expect to see this feature implemented? Does it work for you for a Gauge metric exporting the status of thresholds where the single time series is based on the metric monitored by k6 and the expression set on it, like the following example?

k6_thresholds{metric="http_req_duration", expression="p(95) < 800"} 1 where 0 equals pass and 1 equals fail

I don't expect this feature will be enabled by default so a k6 option would be required for an explicit set of the Thresholds export.

@codebien codebien added enhancement New feature or request evaluation needed labels Jun 27, 2022
@immavalls
Copy link

This is also an ask from https://community.k6.io/t/threshold-results-in-influx-grafana/5617. We can use the experimental-prometheus-rw to output to influbdb. However it won't have the thresholds.

@dgzlopes dgzlopes changed the title What happens to k6 thresholds when writing to prometheus? Add support to export Thresholds Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request evaluation needed
Projects
None yet
Development

No branches or pull requests

3 participants