Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions en/docs/ai-gateway/next/logging-and-tracing/audit-logs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: "Audit logs"
description: "Record who created, changed, or deleted LLM providers, LLM proxies, MCP proxies, and other resources through the AI Gateway's management API."
canonical_url: https://wso2.com/api-platform/docs/ai-gateway/next/logging-and-tracing/audit-logs/
md_url: https://wso2.com/api-platform/docs/ai-gateway/next/logging-and-tracing/audit-logs.md
tags:
- ai-gateway
- logging
- observability
- audit
- security
author: WSO2 API Platform Documentation Team
last_updated: 2026-11-12
content_type: "concept"
---

# Audit logs

Audit logs record every change made through the AI Gateway's management API. Each record shows who made the change, what changed, when, and whether the change was applied.

Audit logs track changes to the gateway's configuration. To see what the gateway process is doing, use [Gateway logs](gateway-logs.md). To capture the traffic, use [Log requests and responses](log-requests-and-responses.md).

## What is recorded

Changes to these resources are recorded:

- LLM providers, LLM proxies, and LLM provider templates
- MCP proxies
- Agents
- REST and GraphQL APIs
- API keys, subscriptions, and subscription plans
- Certificates

Viewing a resource isn't recorded. Changes pushed to the gateway from the control plane are recorded by the control plane, not by the gateway.

## Turn on audit logging

Turn on audit logging in the gateway controller's `config.toml`. The gateway then sends each record to the gateway controller's log, to a log file, or to a log receiver such as Splunk.

For the steps and settings, see [Audit logging](../../../../api-gateway/next/observability/audit-logging/) in the API Platform Gateway documentation.

## Related topics

- [Gateway logs](gateway-logs.md): collect the logs the gateway writes about itself.
- [Log requests and responses](log-requests-and-responses.md): record the traffic rather than changes to the gateway.
3 changes: 2 additions & 1 deletion en/docs/ai-gateway/next/logging-and-tracing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ The pages in this section answer one question each:
| [Gateway logs](gateway-logs.md) | Configure centralized log collection for API Platform AI Gateway using Fluent Bit, OpenSearch, and alternative logging stacks. |
| [Log requests and responses](log-requests-and-responses.md) | Record the payload and headers of traffic passing through the AI Gateway, as a log line per request or through a policy on chosen operations. |
| [Tracing](tracing.md) | Configure distributed tracing for API Platform AI Gateway using OpenTelemetry and Jaeger, with support for cloud-native tracing backends. |
| [Audit logs](audit-logs.md) | Record who created, changed, or deleted LLM providers, LLM proxies, MCP proxies, and other resources through the AI Gateway's management API. |

Gateway logs are the runtime's own output, so they tell you how the gateway is behaving. Request and response logging captures the traffic content, so it tells you what a caller sent and what a model returned. Tracing follows one request across every hop it makes, so it tells you where time went.
Gateway logs are the runtime's own output, so they tell you how the gateway is behaving. Request and response logging captures the traffic content, so it tells you what a caller sent and what a model returned. Tracing follows one request across every hop it makes, so it tells you where time went. Audit logs answer a different question: who changed the gateway's configuration, and when.

## How logging and tracing differ from analytics

Expand Down
1 change: 1 addition & 0 deletions en/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ nav:
- ai-gateway/next/logging-and-tracing/index.md
- Gateway Logs: ai-gateway/next/logging-and-tracing/gateway-logs.md
- Log Requests and Responses: ai-gateway/next/logging-and-tracing/log-requests-and-responses.md
- Audit Logs: ai-gateway/next/logging-and-tracing/audit-logs.md
- Tracing: ai-gateway/next/logging-and-tracing/tracing.md
- Analytics:
- ai-gateway/next/analytics/index.md
Expand Down