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

Support different severity levels for Spidermon alerts #396

Open
curita opened this issue Mar 31, 2023 · 2 comments
Open

Support different severity levels for Spidermon alerts #396

curita opened this issue Mar 31, 2023 · 2 comments

Comments

@curita
Copy link
Member

curita commented Mar 31, 2023

Background

All Spidermon failed checks are reported as ERRORs at the moment. Everything belongs to the same category and can't be addressed differently. It could be nice to have different severity levels to signal how critical those failed checks are and allow us to take distinct actions based on them.

This idea was initially introduced in the discussions for #375.

Proposal

We could use existing log levels as severity levels and log those messages with that severity. ERROR could remain the default severity and introduce a lower priority (WARNING) and a higher priority (CRITICAL) severity level.

Initially, this could be supported only in custom monitors via some new parameter in the assertions of the test methods. And we could support assigning different Spidermon Actions based on these severity levels.

This feature should be backward compatible ideally, considering ERRORs the default severity.

@VMRuiz
Copy link
Collaborator

VMRuiz commented Apr 3, 2023

I could see some utility for this, but wouldn't it make more sense to group the monitors in different suites per their severity and use different actions on each case?

On my experience, everything that is not an error in the logs will be ignored, and if it's ignored what's the point of having a monitor for it?

@rennerocha
Copy link
Collaborator

I also have the feeling that if it is not an error, it will be ignored. We have the WarningCountMonitor, so if we reach a certain amount of warnings, we can fail a monitor, but as we need to ensure that this monitor will only run after all others is executed (so we can take some action if the other warning monitors "fail").

But being able to have different "levels" of monitors may be somewhat interesting ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants