Skip to content
For the complete Netlify documentation index, see llms.txt. Markdown versions of any documentation page are available by appending .md to its URL.

Monitoring and logs

Your project has a Server page in the Netlify UI, under Cloud compute. It shows how your server is doing: the requests it handles, the memory and CPU it uses, the instances it runs, and what it logs.

By default, the page shows production. You can switch to another branch to see an agent run, or, if your project is connected to a Git repository, a branch deploy or Deploy Preview. Each of these runs its own server instances.

The page opens in Live mode, showing the last hour and adding new data as it comes in. To look at a fixed period, turn off Live or choose another time range.

The Overview tab shows these metrics for the selected time range. Select one to show it over time in the chart:

  • Requests: how many requests your server handled, and how many of them were errors.
  • Latency: how long requests took, at the 95th percentile. The chart also shows the 50th and 99th.
  • Memory: the memory your instances used, compared to their limit.
  • CPU: your instances’ CPU usage.
  • Saturation: how busy your instances were, as Netlify judges it for load-aware routing.

Each chart also shows how many instances were running, which periods your server was scaled to zero, and when you deployed.

The Instances table lists the instances that ran in the selected time range, with their state, why they started, their age, and how many requests they handled. You can filter it by state and by start reason.

Select up to 5 instances to show each of them separately in the chart. If you select only one, the requests and logs below show only that instance’s.

Open an instance to see its details, such as its peak memory and the most requests it handled at once. Its lifecycle shows when and why it started, how long it took to start, and when and why it stopped, followed by its latest logs. If instances failed to start during the selected time range, a warning above the charts says how many failed, and why.

Below the instances, you can switch between the Requests and Logs views. The Requests view lists the requests your server handled, with their status code, instance, and duration. You can filter it by status code class, such as 5xx.

Open a request to see its details, including whether it caused a cold start, how long it waited for its instance to have room, how many other requests its instance was handling, and the instance’s memory use. Its logs appear below. To see the request’s full path through Netlify, select Open in Observability.

The Region tab sets the region your server runs in. A region set in netlify.toml takes precedence, and a change takes effect on your next deploy.

Anything your server writes to stdout or stderr appears in the Logs view of the Server page. This includes your own logs, logs from the libraries you use, and errors Netlify logs on your server's behalf, such as a shutdown hook that throws.

You can also view server logs for a specific request via the observability page.

In the Logs view, you can:

  • Filter logs by severity, instance, and branch.
  • Search for text in them.
  • Choose the time range to show.

Lines your code logs with console while handling a request carry that request's ID, which is also available as requestId on the request's context. They also appear in the request's details, alongside the request itself. The severity of each line comes from the console method that logged it, such as console.error or console.warn.

Lines written at other times, such as while your server starts, aren't tied to a request. Neither are lines written directly to process.stdout or process.stderr, which some logging libraries do, so use console for logs you'll want to connect to a request.

The Netlify CLI logs command shows server logs in your terminal, alongside your functions and edge functions. Pass --source server to see only your server's logs. Add --since to choose a time window, or --follow to see lines as your server writes them:

Terminal window
# Server, function, and edge function logs from the last 10 minutes
netlify logs
# Server logs only, from the last 30 minutes
netlify logs --source server --since 30m
# Server logs as your server writes them
netlify logs --source server --follow

The command's other options, such as --level and --json, work with server logs too. --deploy-id and --url don't, because server logs can't be filtered by deploy. For a long time window, the command shows only the most recent lines, so narrow --since and --until to see older ones.

To send server logs to a monitoring service, select Server logs as one of the log types when you configure a log drain. For the fields each line includes, refer to Server log output.