Enterprise Features
Audit Logging
Enable and use tamper‑evident audit logs for your Formbricks instance.
Audit logs record who did what, when, from where, and with what outcome across your Formbricks instance.
Benefits of audit logging
- Compliance readiness — Many regulatory frameworks such as GDPR and SOC 2 require immutable records of user activity.
- Security investigation support — Audit logs provide clear visibility into user and system actions, helping teams respond quickly and confidently during security incidents.
- Operational accountability — Track changes across the system to answer common questions like “who modified this?” or “when was this deleted?”.
Prerequisites
Requirement | Notes |
---|---|
redis | Used internally to guarantee integrity under concurrency. |
Enabling audit logging
- Set the following environment variables in your deployment (Docker Compose, Kubernetes, etc.):
title=".env"
- Redeploy your containers.
- Confirm you can see audit logs in the output of your containers.
Audit logs are printed to stdout as JSON Lines format, making them easily accessible through your container logs or log aggregation systems.
Understanding the log format
Audit logs are JSON Lines (one JSON object per line). A typical entry looks like this:
Key fields:
Field | Description |
---|---|
level | Log level, always "audit" for audit events |
time | Unix timestamp in milliseconds |
pid | Process ID of the logging instance |
hostname | Hostname of the server generating the log |
name | Application name, typically "formbricks" |
timestamp | ISO‑8601 time of the action |
actor | User or API key responsible (object with id and type ) |
action | Constant verb‑noun string (survey.updated , login.failed , …) |
target | The resource affected (object with id and type ) |
status | success or failure |
organizationId | Organization identifier where the action occurred |
ipAddress | User IP address, present only if AUDIT_LOG_GET_USER_IP=1 , otherwise "unknown" |
apiUrl | (Optional) API endpoint URL if the logs was generated through an API call |
eventId | (Optional) Available on error logs. You can use it to refer to the system log with this eventId for more details on the error |
changes | (Optional) Only the fields that actually changed (sensitive values redacted) |
integrityHash | SHA‑256 hash chaining the entry to the previous one |
previousHash | SHA‑256 hash of the previous audit log entry for chain integrity |
chainStart | (Optional) Boolean indicating if this is the start of a new audit chain |
Additional details
- Redacted secrets: Sensitive fields (e‑mails, access tokens, passwords…) are replaced with
"********"
before being written. - Failure events count: Both successful and failed operations are logged.
- Single source of truth: The same logs power the
Formbricks
UI and API endpoints. - Scope limitation: For now, only events triggered inside the
Formbricks
application are audited. This means:- Embed and Link Surveys are not included in the audit logs.
- Survey responses created via the client API or client-side SDKs are not audited.