---
title: Audit Logs
description: Comprehensive audit logging in Langfuse tracks all system activities with detailed state capture and user attribution for enterprise security and compliance requirements.
sidebarTitle: Audit Logs
---

# Audit Logs

**Where is this feature available?**

| Plan | Availability |
| --- | --- |
| Hobby | Not Available |
| Core | Not Available |
| Pro | Not Available |
| Enterprise | Available |
| Self Hosted | Enterprise 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.

## Viewing Audit Logs

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

  ![Audit Logs Interface](/images/changelog/2025-01-21-audit-logs.png)

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

<!-- agent-instructions -->

---

## Agent Instructions

This page is part of the [Langfuse](https://langfuse.com) documentation, published as plain Markdown for AI agents. Every page is available as Markdown by appending `.md` to its URL, or by sending an `Accept: text/markdown` header. This page: `https://langfuse.com/docs/administration/audit-logs.md`.

### Querying these docs

If the answer is not on this page, query the documentation instead of guessing:

- **Semantic search** across all Langfuse docs, returning an answer with the relevant pages and excerpts. Ask a specific, self-contained question:

  ```bash
  curl -sG "https://langfuse.com/api/search-docs" --data-urlencode "query=How do I trace a LangGraph agent?"
  ```

- **Index of every page**: <https://langfuse.com/llms.txt>, with per-section indexes [llms-docs.txt](https://langfuse.com/llms-docs.txt), [llms-integrations.txt](https://langfuse.com/llms-integrations.txt), and [llms-self-hosting.txt](https://langfuse.com/llms-self-hosting.txt).

### Before writing Langfuse code

- **Install the [Langfuse Agent Skill](https://langfuse.com/docs/api-and-data-platform/features/agent-skill).** It encodes Langfuse's own best practices for instrumentation, prompt management, and evaluation, and materially improves results.
- **Read [What does a good trace look like?](https://langfuse.com/docs/observability/best-practices.md)** before instrumenting an application.
- **Verify endpoints, parameters, and response fields** against the [API reference](https://api.reference.langfuse.com) instead of inferring them from code examples.
- **Use the [Langfuse CLI](https://langfuse.com/docs/api-and-data-platform/features/cli)** (`npx langfuse-cli api <resource> <action>`) to read or write traces, prompts, datasets, and scores from the terminal.

Found an error in these docs? Please open an issue at <https://github.com/langfuse/langfuse-docs/issues>.
