Skip to content

Commit 7f9fed6

Browse files
committed
Update README on how to debug warmer function
1 parent 669f7f3 commit 7f9fed6

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,10 +440,24 @@ Enabling this option can significantly help to reduce the cold start time of the
440440

441441
## Debugging
442442

443-
To find the **server and image optimization log**, go to the AWS CloudWatch console in the **region you deployed to**.
443+
#### Function logs
444+
445+
To find the **server, image optimization, and warmer log**, go to the AWS CloudWatch console in the **region you deployed to**.
444446

445447
If the server function is **deployed to Lambda@Edge**, the logs will appear in the **region you are physically close to**. For example, if you deployed your app to `us-east-1` and you are visiting the app from in London, the logs are likely to be in `eu-west-2`.
446448

449+
#### Warmer function logs
450+
451+
The logs from the warmer function provide insights into the results of the warming process.
452+
453+
```
454+
{ event: 'warmer result', sent: 2, success: 2, uniqueServersWarmed: 2 }
455+
```
456+
457+
- `sent` — The number of times the warmer invoked the server function using the Lambda SDK. This value should correspond to the `CONCURRENCY` set in the warmer function.
458+
- `success` — The number of SDK calls that returned a 200 status code, indicating successful invocations.
459+
- `uniqueServersWarmed` — This helps track any instances that responded unusually quickly and served multiple warming requests. As all SDK calls are made concurrently using `await Promise.all()`, this metric is useful for monitoring the number of unique warmed instances.
460+
447461
#### Debug mode
448462

449463
You can run OpenNext in debug mode by setting the `OPEN_NEXT_DEBUG` environment variable:

0 commit comments

Comments
 (0)