Convex Audit Log
Convex Audit Log is a component for tracking user actions, API calls, and system events in Convex applications.
It captures who did what and when, with support for before-and-after change tracking, PII redaction, configurable retention, flexible querying, real-time monitoring, anomaly detection, and JSON or CSV report generation.
Installation
npm install convex-audit-logRegister the component in convex/convex.config.ts:
import { defineApp } from "convex/server";
import auditLog from "convex-audit-log/convex.config.js";
const app = defineApp();
app.use(auditLog);
export default app;What it supports
- Automatic event capture for application actions and system events
- Before-and-after diffs for changed records
- PII redaction rules for sensitive fields
- Queries by actor, resource, severity, time range, action, or tag
- Real-time subscriptions for critical events
- Bulk logging, anomaly detection, statistics, and compliance reports
- React hooks for activity feeds and audit dashboards
- Configurable cleanup and retention policies