Expose a list of errors (with their counts) to the `handleSummary()`
Feature Description
Prompted by this community forum question, it seems like a nice idea to keep track of the errors that were encountered during the test run...
We kind of do it in the cloud, via the metrics' error and error_code tags, but not in local k6 execution. The metric error tag is ignored by default in the end-of-test summary (for which https://github.com/grafana/k6/issues/1321 will help) and besides that, we only log the errors when they happen. While users can pipe the logs to a file or loki, and then query that and get the same data, that's not a very nice user experience...
Suggested Solution (optional)
Keep a map (by error_code, for efficiency) with the encountered errors and their counts?
@AsianCat54x, unfortunately this is not a straightforward feature to add, thus the evaluation needed tag and question mark at the end of my suggested solution. We have no idea how the best way to implement implement this is, or even if there isn't a better alternative idea that would lead to the same or better results for users. So, this is definitely not a good first issue, but if you'd like to work on it, I'd suggest starting with a somewhat fleshed out implementation proposal in this issue, which we can then discuss in detail, instead of with a PR directly.
hi!, has there been any news on this? - I do see my stacktrace error msgs in the k6 logs file (using K6_LOG_OUTPUT env variable), but i can't see anything in the handleSummary output, it would be nice to see that there was some error related to given scenario in the summary
Hi @ksamodulski 👋🏻
There hasn't been any recent developments on this topic, but we are aiming to work on this in the not so distant feature as part of our effort to improve all-things summary in k6.
We unfortunately don't have an ETA, nor promises this will land in the future, but we do intend to look into it. If you have any further feedback or additional context on this issue, how you experience, and what an ideal outcome/solution would be for you, it would be very appreciated though 🙏🏻 🙇🏻