-
Notifications
You must be signed in to change notification settings - Fork 15
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
Feature/bai 928 implement user monitoring in bailo v2 #884
Feature/bai 928 implement user monitoring in bailo v2 #884
Conversation
onCreateModel(req: Request, model: ModelDoc) { | ||
this.checkEventType(AuditInfo.CreateModel, req) | ||
const event = this.generateEvent(req, { id: model.id }) | ||
log.info(event, req.audit.description) |
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.
I think we should still use req.log
here and NOT provide user
within the this.generateEvent()
function. By using req.log
we also store request related information (e.g. the UUID we use to link log messages together).
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.
After switching to using req.log.info()
this is an example of what we get in the logs:
info - (file://connectors/v2/audit/stdout.ts:49): Model Searched (User={ dn: 'user' } EventDetail={
typeId: 'SearchModels',
resource: '{"url":"/api/v2/models/search?type=all&search=","results":["a-twfbex"]}'
})
I don't see any request related information?
No description provided.