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

[rules engine] create a Record class to be used during rule processing #1154

Open
ryandeivert opened this issue Feb 21, 2020 · 0 comments
Open

Comments

@ryandeivert
Copy link
Contributor

Background

The rec that is passed to any given rule function is an ordinary dict that allows for lookups, etc to perform alerting logic. We have built a lot of features to make it easier to do things in rules that would otherwise be repetitive over time.

Desired Change

Implement a class for records aka Record that would subclass the basic dict. This would enable backward compatibility and allow for implementing local methods on the Record to do away with the need for importing methods from helpers.

We could also leverage the new class for doing stuff like monitoring which keys have been used by a rule for "alerting" and then programmatically cull down the actual values from the record that resulted in an alert to simplify the output for the user.

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

No branches or pull requests

1 participant