-
Notifications
You must be signed in to change notification settings - Fork 10
Feat log structure user activity #3826
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
4cfef76
to
0a01cfa
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.
This PR implements structured logging for user activity across admin and user operations. While the logging implementation is comprehensive, there are several critical issues: a console.log statement in production code, inconsistent action naming patterns, and architectural concerns with direct controller instantiation. The logging context types are well-structured, but some actions have misleading names and there's potential for logging sensitive operations without proper context.
packages/backend/src/modules/users/controllers/users-supervisor.controller.ts
Show resolved
Hide resolved
packages/backend/src/modules/portail-admin/controllers/admin-users/admin-users.controller.ts
Outdated
Show resolved
Hide resolved
0a01cfa
to
c7cebb9
Compare
c7cebb9
to
4d43fd0
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.
This PR adds structured logging for user activity operations (create, delete, role changes) across both structure and admin contexts. The implementation includes proper log context types and integrates logging into existing user management flows. However, there are several critical issues that need attention: missing userId in log context for delete operations, inconsistent action naming in admin controller, and potential null reference errors in role change logging.
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.
This PR adds structured logging for user activity operations (create, delete, role changes) across both structure and admin contexts. The implementation includes proper log context types and integrates logging into existing user management flows. However, there are several critical issues that need attention: missing userId in log context for delete operations, inconsistent action naming in admin controller, and potential null reference errors in role change logging.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3826 +/- ##
==========================================
- Coverage 65.70% 65.70% -0.01%
==========================================
Files 970 971 +1
Lines 16238 16245 +7
Branches 2245 2241 -4
==========================================
+ Hits 10669 10673 +4
- Misses 5224 5365 +141
+ Partials 345 207 -138
... and 61 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
packages/backend/src/modules/users/controllers/users.controller.ts
Outdated
Show resolved
Hide resolved
|
🎉 This PR is included in version 2.213.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
No description provided.