Skip to content

Commit 5c3c2b5

Browse files
authored
Update logpush.mdx
1 parent e15cf05 commit 5c3c2b5

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

src/content/docs/ai-gateway/observability/logpush.mdx

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ AI Gateway allows you to securely export logs to an external storage location, w
1212
You can toggle Logpush on and off in the [Cloudflare dashboard](https://dash.cloudflare.com) settings.
1313

1414
This guide explains how to set up Logpush for AI Gateway, generate an RSA key pair for encryption, and decrypt the logs once they are received.
15-
Logpush has a limit of 4 jobs. If you have reached the [limit of logs stored for your plan](/ai-gateway/reference/limits/), logs will not be exported through Logpush.
1615

17-
<Render file="limits-increase" product="ai-gateway" />
16+
You can store up to 10 million logs per gateway. If your limit is reached, new logs will stop being saved and will not be exported through Logpush. To continue saving and exporting logs, you must delete older logs to free up space for new logs. Logpush has a limit of 4 jobs.
1817

1918
:::note[Note]
2019

21-
To export logs using Logpush, you must have logs turned on for the gateway or have overridden the gateway settings by using the `cf-aig-collect-log` request header.
20+
To export logs using Logpush, you must have logs turned on for the gateway.
2221

2322
:::
2423

@@ -59,19 +58,17 @@ This script will output your RSA privateKey and publicKey on your terminal. Keep
5958

6059
## 2. Upload public key to gateway settings
6160

62-
Once you have generated the key pair, upload the public key to your AI Gateway settings. This key will be used to encrypt your logs. For more information on Logpush refer to [Logs](/logs/get-started/).
61+
Once you have generated the key pair, upload the public key to your AI Gateway settings. This key will be used to encrypt your logs. In order to enable Logpush, you will need logs enabled for that gateway.
6362

64-
:::note[Note]
65-
You should enable Logpush in AI Gateway settings. This option only shows up when logs are enabled.
66-
You can toggle on or off as needed. If you do not have logs turned on nothing will be saved.
63+
## 3. Set up Logpush
6764

68-
:::
65+
To set up Logpush, refer to [Logpush Get Started](/logs/get-started/).
6966

70-
## 3. Receive encrypted logs
67+
## 4. Receive encrypted logs
7168

7269
After configuring Logpush, logs will be sent encrypted using the public key you uploaded. To access the data, you will need to decrypt it using your private key. The logs will be sent to the object storage provider that you have selected.
7370

74-
## 4. Decrypting logs
71+
## 5. Decrypting logs
7572

7673
To decrypt the encrypted log bodies and metadata from AI Gateway, you can use the following Node.js script:
7774

@@ -118,6 +115,12 @@ lineReader.on("line", (line) => {
118115
});
119116
```
120117

118+
Run the script by executing the code below on your terminal. Where `file name` is the name of your JavaScript file.
119+
120+
```bash
121+
node {file name}
122+
```
123+
121124
## Script Explanation
122125

123126
The script reads the encrypted log file `(my_log.log.gz)`, decrypts the metadata, request body, and response body, and prints the decrypted data.

0 commit comments

Comments
 (0)