Skip to content

Legacy Logs

Last updated View as MarkdownAgent setup

Legacy Logs provides an AI Gateway dashboard viewer and Logs API. To configure default collection or per-request headers, refer to Logging.

View request details

The dashboard viewer shows individual requests for each gateway. It includes the shared request fields described in Logging.

Manage storage

Each gateway has a configurable storage limit based on your plan. Workers Free accounts can store 100,000 logs across all gateways. Workers Paid accounts can store 10 million logs per gateway.

Each stored log can be up to 10 MB. Legacy Logs does not store logs exceeding that size.

Legacy Logs persists stored logs until you delete them.

When you reach a storage limit, Legacy Logs can stop saving logs or automatically delete the oldest logs. If saving stops, delete stored logs before Legacy Logs can save more.

For plan details, refer to AI Gateway pricing.

Delete logs automatically

In your gateway settings, turn on Automatic Log Deletion. Legacy Logs deletes the oldest logs when your account reaches its storage limit.

Delete logs manually

In the dashboard, open the gateway Logs tab. Apply filters, and then select Delete logs.

The dashboard supports these filters:

Filter category Filter options Description
Status Error, status Matches an error type or status
Cache Cached, not cached Matches cache status
Provider Specific providers Matches an AI provider
AI models Specific models Matches an AI model
Cost Less than, greater than Compares cost with a threshold
Request type Workers AI Binding, WebSockets Matches the request type
Tokens Total tokens, Tokens In, Tokens Out Compares token count with a threshold
Duration Less than, greater than Compares duration with a threshold
Feedback Equals, does not equal (thumbs up, thumbs down, no feedback) Matches feedback
Metadata key Equals, does not equal Matches a metadata key
Metadata value Equals, does not equal Matches a metadata value
Log ID Equals, does not equal Matches a log ID
Event ID Equals, does not equal Matches an event ID
DLP action FLAG, BLOCK Matches the DLP action
User agent Equals, does not equal, contains Matches the requesting client user agent

Use the Logs API

The Legacy Logs API lets you list stored logs. To delete matching logs programmatically, use the DELETE logs endpoint.

Was this helpful?