-
Notifications
You must be signed in to change notification settings - Fork 49
feat: Add CRUD log messages #1005
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
Conversation
@zkayyali812 Would it be possible to use a separate package like this one https://github.com/jjkester/django-auditlog |
@mkanoor I expect if we used an alternate library here, there could be potential of downstream impact. |
e2e tests now pass without read enabled. Will test again with read enabled. |
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.
Shall we include the resource ID in the logs as well? It is possible to ascertain the ID from the previous call to the API, as long as the server is not processing parallel requests. For example:
eda-api-1 | 2024-08-15 01:20:22,789 django.channels.server INFO HTTP GET /api/eda/v1/projects/1/ 200 [0.19, 172.18.0.1:34558]
eda-api-1 | 2024-08-15 01:20:23,550 aap_eda.api.views.project INFO Action: Read / ResourceType: Project / ResourceName: QE-project 1YuqSVFtgHfJzROfvtCV4 / Organization: Default
But on a busy server that it processing many requests in parallel this will become difficult, e.g:
eda-api-1 | 2024-08-15 01:20:26,326 django.channels.server INFO HTTP GET /api/eda/v1/activations/1/ 200 [0.31, 172.18.0.1:34558]
eda-api-1 | 2024-08-15 01:20:26,328 django.channels.server INFO HTTP GET /api/eda/v1/activations/2/ 200 [0.30, 172.18.0.1:33632]
eda-api-1 | 2024-08-15 01:20:26,961 aap_eda.api.views.activation INFO Action: Read / ResourceType: RulebookActivation / ResourceName: QE-activation-batch---1a2AdC34aba3BbaBAb2c4 / Organization: Default
Including the ID in the CRUD logs will make it clear.
|
Description: Adds CRUD logging messages to core EDA resources.
Jira: https://issues.redhat.com/browse/AAP-29258
Rulebook Activations Logging added for following operations-
Decision Environments Logging added for following operations-
Project Logging added for following operations-
EventStreams Logging added for following operations -
Rulebook Activation Start/Stop/Restart (Already exists)