-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Refactor the extended MetricExtension interface to match fundamental events in Sentinel #1675
Conversation
…nel) - Unify the extended interface as a few event handlers: onPass, onBlocked, onComplete and onError - Polish related code Signed-off-by: Eric Zhao <[email protected]>
I have done a quick overview on this pr. So my concern is that why we insist on keeping the inheritance between event style interface and counter style interface(legacy one)? Since anyone who wants to implement "Advanced" one must implement interfaces, addPass/onPass, addBlock/onBlock, etc., altogether even he only want to follow the method group of event style. Is there any constraint we must merge them into a base, non-empty interface type? Normally and mostly we may use an empty base interface for referencing and do type detection later. Sure for backward compatibility this way should not be used. Another thought is that we can separate them into independent interfaces and maintain in two registries or collections. I will continue to do a quick review after we make these clear. |
Yes, it's not released yet.
This is only a temporary workaround for backward compatibility (as some other libraries has been integrating with the SPI). Actually I was planning to deprecate the legacy |
Understood. |
It's not settled down. Discussions are needed later.
That's it. |
Got it now and I have no further question. |
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.
LGTM
Describe what this PR does / why we need it
Refactor the extended
AdvancedMetricExtension
interface (new added in #1665) to match fundamental events (pass, block, complete) in Sentinel.Does this pull request fix one issue?
Improvement for #1665
Describe how you did it
Describe how to verify it
Run all test cases for regression.
Special notes for reviews
NONE