[mod] metrics: add secondary parameter

Some error won't stop the engine:
* additional HTTP redirects for example
* some invalid results

secondary=True allows to flag these errors as not important.
This commit is contained in:
Alexandre Flament 2021-04-17 18:15:50 +02:00
parent 7acd7ffc02
commit c27fef1cde
3 changed files with 19 additions and 14 deletions

View file

@ -92,7 +92,8 @@ class OnlineProcessor(EngineProcessor):
hostname = response.url.host
count_error(self.engine_name,
'{} redirects, maximum: {}'.format(len(response.history), soft_max_redirects),
(status_code, reason, hostname))
(status_code, reason, hostname),
secondary=True)
return response