Skip to content
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

Merged
merged 22 commits into from
Dec 1, 2023

Conversation

JR40159
Copy link
Member

@JR40159 JR40159 commented Nov 17, 2023

No description provided.

@JR40159 JR40159 marked this pull request as ready for review November 24, 2023 09:13
onCreateModel(req: Request, model: ModelDoc) {
this.checkEventType(AuditInfo.CreateModel, req)
const event = this.generateEvent(req, { id: model.id })
log.info(event, req.audit.description)
Copy link
Member

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).

Copy link
Member Author

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?

@JR40159 JR40159 merged commit 6f5fb29 into main Dec 1, 2023
@JR40159 JR40159 deleted the feature/BAI-928-implement-user-monitoring-in-bailo-v2 branch December 1, 2023 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants