phantomas icon indicating copy to clipboard operation
phantomas copied to clipboard

Monitoring error pages

Open ldevernay opened this issue 1 year ago • 6 comments

Hi, As of today, it is difficult to monitor 404 error pages because they are handled as errors, which prevents metrics from being gathered and some best practices from being checked. However, it could be really interesting to monitor error pages, as stated in this article from Matt Hobbs : https://nooshu.com/blog/2020/08/25/you-should-be-testing-your-404-pages-web-performance/

Do you think it would be possible?

ldevernay avatar Sep 20 '22 14:09 ldevernay

@ldevernay, great idea!

macbre avatar Sep 20 '22 14:09 macbre

@ldevernay, how does a command line option --validate-all-response-codes sounds to you? It will cause all metrics to be returned instead of returning an error due to non-200 response code.

I'm open for discussing the naming here ;)


Inspired a bit by https://github.com/axios/axios/issues/41 and https://axios-http.com/docs/handling_errors.

macbre avatar Sep 20 '22 19:09 macbre

Hi @macbre, Thanks for this quick and thorough answer! I will check with the rest of the team and let you know but this sounds great.

ldevernay avatar Sep 22 '22 07:09 ldevernay

OK, that was fast : as soon as you implement this option, I confirm that we can use this on our side and it might solve our issue with 404 pages (and apparently other error pages as well). Regarding the naming for the option, I get your point but can't find anything better for now. I think --validate-all-response-codes is clear enough.

ldevernay avatar Sep 22 '22 07:09 ldevernay

Great! Will work on that.

Similar: #809 and #823

macbre avatar Sep 22 '22 19:09 macbre

Awesome, thx!

ldevernay avatar Sep 27 '22 09:09 ldevernay