Track user actions, API calls, and system events in Convex apps with automated logging, PII redaction, and compliance features.
npm install convex-audit-logFeatures
Automatic Event Capture - Log who, what, when, and where for any action
Change Tracking - Record before/after states with automatic diff generation
PII Redaction - Built-in privacy controls for sensitive data
Flexible Querying - Query by actor, resource, severity, time range, and more
Real-time Monitoring - Subscribe to critical events as they happen
Anomaly Detection - Detect unusual patterns in event frequency
Report Generation - Export audit logs as JSON or CSV
Configurable Retention - Automatic cleanup with customizable policies
React Hooks - Pre-built hooks for common UI patterns
Convex Audit Log automatically captures mutation calls with actor, timestamp, and data changes. Simply wrap your mutations with the audit logger to track who made changes, what data was modified, and when it happened.
The component provides automatic event capture for user actions across your Convex app. It logs authentication events, data modifications, and custom business events with built-in React hooks for displaying activity feeds.
Convex Audit Log handles compliance needs with automatic PII redaction, configurable data retention policies, and structured export formats. It maintains immutable logs with cryptographic integrity for regulatory requirements.
The built-in anomaly detection monitors event frequency and patterns to flag suspicious behavior. You can subscribe to real-time alerts and configure thresholds for different event types and user roles.
Convex Audit Log is designed for minimal performance impact with asynchronous logging and batched writes. It leverages Convex's built-in reactivity system and only processes events that match your configured rules, avoiding unnecessary overhead.
Yes, Convex Audit Log provides flexible configuration for event filtering and PII redaction rules. You can specify which fields to log, what to redact based on patterns or field names, and set different policies for different event types.
Convex Audit Log includes optimized database indexes and query helpers for common patterns like filtering by actor, resource, time range, or event type. The component provides React hooks that handle pagination and real-time updates automatically.
Convex Audit Log automatically handles cleanup based on your retention policies while maintaining referential integrity. You can configure different retention periods for different event types and export logs before deletion for long-term archival.
Convex Audit Log supports exporting logs in JSON and CSV formats, and provides webhooks for real-time event streaming. You can easily integrate with external SIEM systems, monitoring tools, or compliance platforms using the structured export APIs.