In a project, I created a class extending FlatlineRule and added some custom code.
However, I had to copy the code of check_for_match and garbage_function in the children class just to change a few lines of code, which isn't great.
This PR adds:
a get_threshold function (users will be able to override that function in case the threshold changes depending on the key).
a get_keys function (in my case I'm retrieving the keys from an external API)
a get_event_data function (to add custom variable for alerts)
Description
In a project, I created a class extending
FlatlineRule
and added some custom code. However, I had to copy the code ofcheck_for_match
andgarbage_function
in the children class just to change a few lines of code, which isn't great.This PR adds:
get_threshold
function (users will be able to override that function in case the threshold changes depending on the key).get_keys
function (in my case I'm retrieving the keys from an external API)get_event_data
function (to add custom variable for alerts)Checklist
make test-docker
with my changes.Questions or Comments
I did not add any unit tests because there isn't any new feature. I did not update the documentation because there's no section about extending rules.