-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: Add hooks implementation #95
Conversation
1d86d02
to
fafe675
Compare
Signed-off-by: Maxim Fischuk <mfischuk@vareger.com> Signed-off-by: MaximFischuk <mfischuk@vareger.com>
Signed-off-by: MaximFischuk <mfischuk@vareger.com>
Signed-off-by: MaximFischuk <mfischuk@vareger.com>
Signed-off-by: MaximFischuk <mfischuk@vareger.com>
aa8b329
to
60ca477
Compare
…ment 4.3.8` of OpenFeature specification Signed-off-by: MaximFischuk <mfischuk@vareger.com>
031f9c5
to
a2b6497
Compare
Hey @MaximFischuk, reviews may be slower than usual around the holidays. Hopefully, someone can take a look soon. I'll do my best to review, but my Rust skills are basically non-existent 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall great job 🍻
…ncy, remove accidentally committed todos Signed-off-by: MaximFischuk <mfischuk@vareger.com>
Signed-off-by: MaximFischuk <mfischuk@vareger.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR looks good from a spec perspective.
Before this is merged, could you please update the hooks section in the readme?
- https://openfeature.dev/specification/appendix-a#logging-hook
- https://github.com/open-feature/rust-sdk?tab=readme-ov-file#develop-a-hook
Thanks @MaximFischuk!
Signed-off-by: MaximFischuk <mfischuk@vareger.com>
Signed-off-by: MaximFischuk <mfischuk@vareger.com>
@beeme1mr @jbovet @gruebel Thank you for your review! I've extended the implementation of the logging hook to support both text and structured features of the @beeme1mr Also, I've updated |
I'll give folks the weekend to review. If there are no concerns, I'll merge early next week. Thanks @MaximFischuk. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work 🍻
changes look great! Implementation of the logging hook provides a flexible solution for tracking feature flag evaluations into the SDK. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MaximFischuk well done!
This PR
This pull request introduces the implementation of Hooks in the OpenFeature SDK following the OpenFeature standard. The changes include the addition of hooks to various stages in the feature flag evaluation process, such as before, after, error, and finally. The implementation provides capabilities to add hooks at the global, client, provider, and invocation levels, which allows for extensive customizability and control over the feature flag lifecycle.
Related Issues
Fixes #5
Notes
Follow-up Tasks
How to test
examples/hooks.rs
to see a working implementation of the hooks in action.src/hooks/mod.rs
to ensure they cover expected behaviors and edge cases.