# Audit Logs

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.

## Viewing Audit Logs

The audit log viewer is available in the Enterprise Edition and provides:

### Access Control

- Available to users with `auditLogs:read` permission
- Typically accessible to project OWNERs and ADMINs
- Controlled through Langfuse's role-based access control system

### Filtering and Navigation

- **Time-based filtering**: View logs for specific time periods
- **Project filtering**: Focus on specific project activities
- **Pagination**: Efficient browsing of large audit trails

## 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:

| 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 |
| **Blob Storage Integration** | update |
| **Comment** | create, delete |
| **Dataset** | create, delete, update |
| **Dataset Item** | create, delete, update |
| **Dataset Run** | delete |
| **Evaluation Template** | create |
| **Job** | create, delete, update |
| **LLM API Key** | create, delete |
| **Membership** | create, delete |
| **Membership Invitation** | create, delete |
| **Model** | create, delete, update |
| **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, update |
| **Score Config** | create, update |
| **Session** | bookmark, publish |
| **Stripe Checkout Session** | create |
| **Trace** | bookmark, delete, publish, 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** (`USER` type): Actions performed by authenticated users through the web interface
- **API Key Actions** (`API_KEY` type): 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

## GitHub Discussions

[Implementing Audit Logs for Self-Hosted OSS](https://github.com/orgs/langfuse/discussions/11597) [Audit logs on organisation level not visible on Self Hosted version with Enterprise](https://github.com/orgs/langfuse/discussions/11525) [Audit logs schema using open source langfuse](https://github.com/orgs/langfuse/discussions/11392) [Postgres table audit_logs filling up in langfuse open source](https://github.com/orgs/langfuse/discussions/10446) [Tracking (logging) manual updates in dataset items](https://github.com/orgs/langfuse/discussions/9949) [Export audit logs to external data lake\SIEM](https://github.com/orgs/langfuse/discussions/7520) [Add Audit Logging System to Worker Tasks](https://github.com/orgs/langfuse/discussions/1277)

Discussions last updated: 9/16/2026.
