Audit logging is an Enterprise feature. Formbricks writes audit events only while
AUDIT_LOG_ENABLED=1 is set
and your Enterprise license is active and includes audit logs. Either one
alone writes nothing.Benefits Of Audit Logging
- Compliance evidence — Exported audit events can support the controls and evidence required by your compliance program.
- Security investigation support — Audit logs provide visibility into covered user and system actions during an incident.
- Operational accountability — Track covered changes to answer questions such as “who modified this?” or “when was this deleted?”.
Enabling Audit Logging
- Activate an Enterprise license that includes audit logs.
- Set the following environment variables in your deployment (Docker Compose, Kubernetes, etc.):
.env
- Redeploy your containers.
- Confirm you can see audit logs in the output of your containers. If none appear, check that the license is active and includes audit logs.
level: "audit" to your central logging destination.
Configure Trusted Proxy Hops
AUDIT_LOG_GET_USER_IP=1 uses Formbricks’ shared client-IP resolver. TRUSTED_PROXY_HOP_COUNT must equal the
number of trusted CDN, WAF, load-balancer, ingress, and Envoy hops that append to X-Forwarded-For before the
request reaches Formbricks. The application and Helm chart default to 1, which assumes one trusted reverse
proxy.
Examples:
With the Helm chart, configure the values under
deployment.env:
Understanding The Log Format
Audit logs are JSON Lines (one JSON object per line). A typical entry looks like this:
Both
ipAddress and userAgent are present on every emitted event. Scheduled system jobs have no client
request and use "unknown" for both. Deferred work triggered by a user retains its originating request’s
metadata. IP capture remains opt-in through AUDIT_LOG_GET_USER_IP=1; user agents are included whenever
auditing is enabled. IPv6 addresses use the same /64 network identity as IP-based rate limiting.
A user agent is supplied by the client and can be forged. Treat it as an investigation hint, not proof
that a request came from a browser, a script, or a particular agent.
Search In SigNoz
Select the environment’s application service and a bounded time window in Logs Explorer. Add anactorId attribute filter equal to the user ID or API key ID, or an ipAddress attribute filter equal
to the recorded canonical address. Combine either filter with actorType, organizationId, or
userAgent to narrow the investigation. The original nested actor remains in the JSON event.
The OpenTelemetry log transport sends these scalar fields as log attributes. If collecting stdout,
configure JSON parsing before filtering on fields. Verify a known test-account event is returned by
both the actor and IP filters; a successful application response alone does not prove log delivery.
Existing events are not backfilled.
Centralized Logging And Compliance
Formbricks emits audit events to the application logger. The container’s stdout stream is not, by itself, a durable or immutable audit store. Your deployment must forward the events to a logging platform and configure the controls required by your organization, including:- retention and archival periods;
- write-once or immutability controls;
- access controls and separation of duties;
- deletion protection and tamper detection; and
- monitoring for delivery failures.
Additional Details
- Redacted values: Sensitive fields covered by the audit redaction helpers are replaced with
"********"before the event is written. - Success and failure: Covered operations can emit both
successandfailureevents. - Delivery model: Formbricks writes events through the application logger; query APIs, long-term retention, and exports belong to your logging platform.
- Scope limitation: For now, only events triggered inside the
Formbricksapplication 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.