Skip to content

feat: Implement Comprehensive Audit Logging System#3669

Closed
suguslove10 wants to merge 2 commits intoDokploy:canaryfrom
suguslove10:feat/audit-logging
Closed

feat: Implement Comprehensive Audit Logging System#3669
suguslove10 wants to merge 2 commits intoDokploy:canaryfrom
suguslove10:feat/audit-logging

Conversation

@suguslove10
Copy link

This PR introduces a robust audit logging system to Dokploy to track user activities and system changes.

Key Changes:

  • Architecture: Created an ActivityLog schema and a dedicated service layer using Drizzle ORM.
  • Instrumentation: Integrated recordActivity across all major API routers (Applications, Databases, Compose, Servers, Domains, etc.).
  • UI/UX: Added a modern Activity Log dashboard in Settings with resource-based filtering, pagination, and metadata tooltips.
  • Maintenance: Added an admin-only feature to purge logs older than 7, 30, or 90 days.

- Created activity log schema and services
- Instrumented 20+ routers with recordActivity
- Added activity log UI with filtering and pagination
- Added log purging functionality for admins
@AlexDev404
Copy link
Contributor

This PR introduces a robust audit logging system to Dokploy to track user activities and system changes.

Key Changes:

  • Architecture: Created an ActivityLog schema and a dedicated service layer using Drizzle ORM.
  • Instrumentation: Integrated recordActivity across all major API routers (Applications, Databases, Compose, Servers, Domains, etc.).
  • UI/UX: Added a modern Activity Log dashboard in Settings with resource-based filtering, pagination, and metadata tooltips.
  • Maintenance: Added an admin-only feature to purge logs older than 7, 30, or 90 days.

Can you provide screenshots of this in action?

@suguslove10
Copy link
Author

suguslove10 commented Feb 16, 2026

Screenshot 2026-02-16 at 2 16 17 PM Here is a screenshot of the Activity Logs dashboard in action. It shows the new "Activity" tab under settings, where users can view, filter, and manage (purge) logs. Each entry includes details like the user, the specific action, the affected resource, and the timestamp.

@AlexDev404
Copy link
Contributor

@suguslove10 why did you close your pull request?

@suguslove10
Copy link
Author

Hi @AlexDev404,

I closed this pull request because I opened a new, updated one here: #3721.

I created a new branch (feat/audit-logging-v2) and a fresh PR to ensure a clean commit history that is fully synced with the latest canary branch.

In the new PR (#3721), I've also incorporated several improvements and addressed all the automated bot review feedback, including:

  • Refined sensitive data redaction to securely hide credentials without over-redacting harmless resource IDs.
    • Restored full error handling by correctly re-throwing TRPCError instances across the updated routers.
    • Ensured complete audit coverage by adding missing logging for cloud/background deployments and compose operations.
    • Added pagination limits (pageSize max 100) to API endpoints to prevent heavy DB queries.

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.

3 participants