Audit Logs
- HobbyNot Available
- CoreNot Available
- ProNot Available
- EnterpriseAvailable
- Self HostedEnterprise Edition
Langfuse's audit logging system provides comprehensive tracking of all system activities, capturing detailed information about who performed what actions, when they occurred, and what changes were made. This feature is essential for enterprise security, compliance requirements, and incident investigation.
What are Audit Logs?
Audit logs are immutable records of all significant activities within your Langfuse organization and projects. They capture:
- Who: User or API key that performed the action
- What: The specific action taken (create, update, delete)
- When: Precise timestamp of the action
- Where: Organization and project context
- Details: Complete before/after state for modifications
These logs provide a complete audit trail for security monitoring, compliance reporting, and forensic analysis.
Audit logs can also record who read your data. See read access.
Viewing Audit Logs
The audit log viewer is available in the Enterprise Edition and provides:
![]()
Access Control
- Available to users with
auditLogs:readpermission - Typically accessible to project OWNERs and ADMINs
- Controlled through Langfuse's role-based access control system
Scope and navigation
- Project scope: View audit logs for the currently selected project
- Pagination: Browse audit logs from newest to oldest
Exporting Audit Logs
You can export audit logs directly from the UI. Thereby you can analyze your data externally or create backups of important information.
How to use:
- Navigate to your audit logs table
- Click the export button on the top right
Event Types and Data Capture
Auditable Resources
Langfuse tracks specific actions across all system resources.
The following table shows the exact resource types and actions that are logged.
When read-access logging is on, access events add list and read on traces, observations, scores, sessions, and experiments; download on traces and observations; and export on batch exports.
| Resource | Actions |
|---|---|
| Annotation Queue | create, delete, update |
| Annotation Queue Item | complete, create, delete |
| API Key | create, delete, update |
| Batch Action | create, delete |
| Batch Export | create, download, export |
| Blob Storage Integration | update |
| Comment | create, delete |
| Dataset | create, delete, update |
| Dataset Item | create, delete, update |
| Dataset Run | delete |
| Evaluation Template | create |
| Experiment | list, read |
| Job | create, delete, update |
| LLM API Key | create, delete |
| Membership | create, delete |
| Membership Invitation | create, delete |
| Model | create, delete, update |
| Observation | download, list, read |
| Organization | create, delete, update |
| Organization Membership | create, delete, update |
| PostHog Integration | delete, update |
| Project | create, delete, transfer, update |
| Project Membership | create, delete, update |
| Prompt | create, delete, promote, setLabel, update, updateTags |
| Prompt Protected Label | create |
| Score | create, delete, list, read, update |
| Score Config | create, update |
| Session | bookmark, list, publish, read |
| Stripe Checkout Session | create |
| Trace | bookmark, delete, download, list, publish, read, updateTags |
State Capture
For update operations, Langfuse captures:
- Before State: Complete resource state prior to modification
- After State: Complete resource state after modification
States are stored as JSON, providing full context for any modifications made to your data.
User Attribution
Identity Sources
Audit logs distinguish between different types of actors:
- User Actions (
USERtype): Actions performed by authenticated users through the web interface - API Key Actions (
API_KEYtype): Programmatic actions via API keys
Context Information
Each entry includes:
- User ID: For user-initiated actions
- API Key ID: For programmatic actions
- Organization ID: Organizational context
- Role Context: User's organizational and project roles at the time of action
Read access
By default, audit logs record changes. With read-access logging on, Langfuse also records an access event when a user or API key reads traces, observations, scores, sessions or experiments through one of the covered views, API routes and MCP tools. Use these events to answer questions such as "who opened this trace?" or "which traces did this user see in a search?".
Access events appear in the audit log viewer next to change events.
Turn on read-access logging
Read-access logging is off by default.
Organization setting
- Go to Organization settings → Audit Logs.
- Turn on Access Logging.
Langfuse records reads in every project of the organization from then on. Reads from before you turned it on are not recorded. Turning it on or off is recorded as a change event.
To change the setting, you need permission to update the organization (the organization OWNER or ADMIN role). The setting is available on Langfuse Cloud Enterprise plans and on self-hosted instances with an Enterprise or Government license key.
On Langfuse Cloud HIPAA (hipaa.cloud.langfuse.com), read-access logging is always on for every organization, and the setting is not shown.
Self-hosted: instance setting
Instance administrators can set read-access logging for all organizations with LANGFUSE_AUDIT_LOG_ACCESS_EVENTS on the web container:
| Value | Behavior |
|---|---|
org (default) | Each organization decides with the Access Logging setting. |
enforced | Reads are recorded in every organization. The organization setting is hidden. |
disabled | Reads are never recorded. The organization setting is hidden. |
Requirements:
- An Enterprise or Government license key (
LANGFUSE_EE_LICENSE_KEY) on the web and worker containers. Without one, nothing is recorded, even withenforced. - Langfuse
v4.82.0or later.
If Langfuse runs behind a load balancer or reverse proxy, also set LANGFUSE_TRUSTED_PROXY_COUNT to the number of proxies in front of it. Otherwise access events from the Langfuse UI carry no client IP address, and events from the public API and MCP carry the address of your proxy.
| Variable | Default | Container | Description |
|---|---|---|---|
LANGFUSE_AUDIT_LOG_ACCESS_EVENTS | org | web | org, enforced or disabled, see above. |
LANGFUSE_TRUSTED_PROXY_COUNT | 0 | web | Number of proxies in front of Langfuse that append to X-Forwarded-For. The client IP is the N-th entry from the right. 0 ignores the header. |
How recording works
- Recorded before data is returned. Langfuse writes the access event before it returns any data. If that write fails, the read fails with an error, so no data is returned without a record. A batch export whose event cannot be written is marked as failed and does not run.
- One event per request. Opening a trace sends several requests, so one trace view produces several events.
- Lists record what was shown. A list or search records its request parameters, the number of rows returned and the id of every returned row, up to 10,000 ids per event.
- Refused reads. A read in the Langfuse UI that is refused for missing permissions is recorded with the outcome
denied. Public API and MCP calls are recorded only when they succeed. - Retention. Audit log retention is not configurable yet, and project data retention does not apply to audit logs. If your compliance program requires you to keep access records for a set period, export them regularly and store the exports yourself.
What is recorded
| Surface | Recorded reads |
|---|---|
| Langfuse UI | Trace and observation detail views, including input and output; the tracing, sessions, scores and experiments tables; session, score and experiment detail views; trace and observation downloads; creating a batch export |
| Public API | GET /api/public/v2/observations, GET /api/public/v3/scores, GET /api/public/experiments, GET /api/public/experiment-items |
| MCP server | getObservation, getScore, listObservations, listScores, listExperiments, listExperimentItems |
Not recorded:
- Aggregates: counts, filter options, metrics and dashboards, including the metrics API and the MCP tool
queryMetrics. - Prompts, datasets, comments and media.
- Scheduled blob storage exports.
- Other public API routes.
- Anonymous viewers of public traces.
Downloading the file of a finished batch export is recorded as a change event in the regular audit log.
View and export access events
Access events appear in the project's audit log viewer (Project settings → Audit Logs), together with change events. You need the auditLogs:read permission, which the project OWNER and ADMIN roles have.
- The Event column tells access events from change events.
- The Outcome column shows whether the read succeeded or was denied.
- Filtering by event, actor, resource or time is not available yet.
The export from the audit log viewer contains all events of the project, including for each access event its route, request parameters, result count and the ids of the returned rows.
The client IP address, user agent and request id are recorded but not shown in the viewer or the export yet. On self-hosted instances, query ClickHouse to read them.
Access event fields
| Field | Content |
|---|---|
timestamp | When the read happened. |
org_id, project_id | The organization and project that were read. |
event_kind | access for reads, change for changes. |
actor_type, user_id, api_key_id | Who read the data: USER, API_KEY or SYSTEM. |
actor_name, actor_email | The user's name and email at the time of the read. They remain after the user leaves the organization. |
user_org_role, user_project_role | The user's roles at the time of the read. |
surface | trpc (Langfuse UI), public-api, mcp, or internal-api (trace and observation downloads). |
route | The UI procedure, API route or MCP tool, for example GET /api/public/v2/observations. |
resource_type, action | What was read and how, for example trace and read, observation and list, or batchExport and export. |
resource_refs | Typed ids of the returned rows: trace:<id>, observation:<id>, score:<id> and session:<id>. |
params | The request's filters, search and pagination as JSON, cut at 2 KB. A cut value ends in ...[truncated]. |
result_count | The number of rows returned. |
outcome, outcome_reason | success, or denied with UNAUTHORIZED or FORBIDDEN. |
ip, user_agent | The client's IP address and user agent. |
request_id | The OpenTelemetry trace id of the request, if it was sampled. |
Self-hosted: query ClickHouse
Self-hosted instances can query the audit_logs table in their ClickHouse database directly, for example with clickhouse client.
Who accessed a trace:
SELECT timestamp, actor_type, actor_email, api_key_id, ip, surface, route, action, outcome
FROM audit_logs
WHERE org_id = '<org-id>'
AND project_id = '<project-id>'
AND event_kind = 'access'
AND has(resource_refs, 'trace:<trace-id>')
ORDER BY timestamp DESC;What a user read during a period:
SELECT timestamp, route, resource_type, action, result_count, params
FROM audit_logs
WHERE org_id = '<org-id>'
AND event_kind = 'access'
AND user_id = '<user-id>'
AND timestamp >= '2026-11-01 00:00:00'
AND timestamp < '2026-11-08 00:00:00'
ORDER BY timestamp;GitHub Discussions
Last updated on