-
Notifications
You must be signed in to change notification settings - Fork 298
Add Events for Policy Service APIs #2479
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
Add Events for Policy Service APIs #2479
Conversation
return resp; | ||
} | ||
|
||
private String getCatalogFromPrefix(String prefix, RealmContext realmContext) { |
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.
nit: inline the method.
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.
Changed.
public class CatalogPolicyServiceEvents { | ||
|
||
// Policy CRUD Events | ||
public record BeforeCreatePolicyEvent( |
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.
Sorry to insist on naming, but it's still inconsistent.
In #2482 we have (Before|After)(Object)(Verb)Event
. E.g. BeforeCatalogListEvent
.
Here we have (Before|After)(Verb)(Object)Event
. E.g. BeforeCreatePolicyEvent
.
(I find verb-object more natural than object-verb btw, but I'll defer the decision to native English speakers.)
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.
Thinking about it again, I think verb-object is better too. Let me keep these events as-is in that case and change the rest of the PRs.
16960b3
to
b4777fd
Compare
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! Do we have plan to add tests that verify all the before and after are correctly called during each request?
+1 to the idea. |
This PR adds the Events instrumentation for the Policy Service APIs, surrounding the default delegated call to the business logic APIs.