Skip to content

Commit e5501a4

Browse files
authored
Update index.mdx
update how to delete logs
1 parent 6d32d88 commit e5501a4

File tree

1 file changed

+8
-2
lines changed
  • src/content/docs/ai-gateway/observability/logging

1 file changed

+8
-2
lines changed

src/content/docs/ai-gateway/observability/logging/index.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,15 @@ curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/openai/chat/
5353
5454
## How to delete logs
5555
56+
To manage your log storage effectively and ensure continuous logging, you can delete logs using the following methods:
57+
5658
### Automatic Log Deletion
5759
58-
​To maintain continuous logging within your gateway's storage constraints, enable Automatic Log Deletion in your Gateway settings. This feature automatically deletes the oldest logs once the log limit you've set or the default storage limit of 10 million logs is reached, ensuring new logs are saved without manual intervention. Logs are deleted in increments of 0.1% of the storage limit, equating to 10,000 logs per deletion when using the default limit.​
60+
​To maintain continuous logging within your gateway's storage constraints, enable Automatic Log Deletion in your Gateway settings. This feature automatically deletes the oldest logs once the log limit you've set or the default storage limit of 10 million logs is reached, ensuring new logs are saved without manual intervention.
5961
6062
### Manual deletion
6163
62-
To manually delete logs, navigate to the Logs tab in the dashboard. Use the available filters such as status, cache, provider, cost, or any other options in the dropdown to refine the logs you wish to delete. Once filtered, select Delete logs to complete the action.
64+
To manually delete logs through the dashboard, navigate to the Logs tab in the dashboard. Use the available filters such as status, cache, provider, cost, or any other options in the dropdown to refine the logs you wish to delete. Once filtered, select Delete logs to complete the action.
6365
6466
See full list of available filters and their descriptions below:
6567
@@ -78,3 +80,7 @@ See full list of available filters and their descriptions below:
7880
| Metadata Value | equals, does not equal | specific metadata values. |
7981
| Log ID | equals, does not equal | a specific Log ID. |
8082
| Event ID | equals, does not equal | a specific Event ID. |
83+
84+
### API deletion
85+
86+
You can programmatically delete logs using the AI Gateway API. For more comprehensive information on the `DELETE` logs endpoint, check out the [Cloudflare API documentation](https://developers.cloudflare.com/api/resources/ai_gateway/subresources/logs/methods/delete/).

0 commit comments

Comments
 (0)