# Runtime Logs

The **Logs** tab allows you to view, search, inspect, and [share](#log-sharing) your runtime logs without any third-party integration. You can also filter and group your [runtime logs](#what-are-runtime-logs) based on the relevant fields.

> **💡 Note:** You can only view runtime logs from the Logs tab. [Build
> logs](/docs/deployments/logs) can be accessed from the production deployment
> tile.

## What are runtime logs?

**Runtime logs** include all logs generated by [Vercel Functions](/docs/functions) invocations in both [preview](/docs/deployments/environments#preview-environment-pre-production) and [production](/docs/deployments/environments#production-environment) deployments. These log results provide information about the output for your functions as well as the `console.log` output.

With runtime logs:

- Logs are shown in realtime and grouped as per request.
- Each action of writing to standard output, such as using `console.log`, results in a separate log entry.
- The maximum number of logs is 256 lines *per request*
- Each of those logs can be up to 256 KB *per line*
- The sum of all log lines can be up to 1 MB *per request*

## Available Log Types

You can view the following log types in the [Logs tab](#view-runtime-logs):

| **Log Type**                  | **Available in Runtime Logs**                                                                  |
| ----------------------------- | ---------------------------------------------------------------------------------------------- |
| Vercel Function Invocation    | Yes                                                                                            |
| Routing Middleware Invocation | Yes                                                                                            |
| Static Request                | Only static request that serves cache; to get all static logs check [Log Drains](/docs/drains) |

## View runtime logs

To view runtime logs:

1. From the dashboard, select the project that you wish to see the logs for
2. Select the **Logs** tab from your project overview
3. From here you can view, filter, and search through the runtime logs. Each log row shares [basic info](#log-details) about the request, like execution, domain name, HTTP status, function type, and RequestId.

## Log filters

You can use the following filters from the left sidebar to get a refined search experience.

### Timeline

You can filter runtime logs based on a specific timeline. It can vary from the past hour, last 3 days, or a custom timespan [depending on your account type](#limits). You can use the **Live mode** option to follow the logs in real-time.

> **💡 Note:** All displayed dates and times are in UTC.

### Level

You can filter requests that contain **Warning**, and **Error** logs. A request can contain both types of logs at the same time. [Streaming functions](/docs/functions/streaming-functions) will always preserve the original intent:

| Source                          | [Streaming functions](/docs/functions/streaming-functions) | Non-streaming Functions |
| ------------------------------- | ---------------------------------------------------------- | ----------------------- |
| `stdout` (e.g. `console.log`)   | `info`                                                     | `info`                  |
| `stderr` (e.g. `console.error`) | `error`                                                    | `error`                 |
| `console.warn`                  | `warning`                                                  | `error`                 |

Additionally:

- Requests with a status code of `4xx` are marked with **Warning** amber
- Requests with a status code of `5xx` are marked with **Error** red
- All other individual log lines are considered **Info**

### Function

You can filter and analyze logs for one or more functions defined in your project. The log output is generated for the [Vercel Functions](/docs/functions), and [Routing Middleware](/docs/routing-middleware).

### Host

You can view logs for one or more domains and subdomains attached to your team’s project. Alternatively, you can use the **Search hosts...** field to navigate to the desired host.

### Deployment

Like host and functions, you can filter your logs based on deployments URLs.

### Resource

Using the resource filter, you can search for requests containing logs generated as a result of:

| **Resource**                                       | **Description**                                                                                                                       |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| **[Vercel Functions](/docs/functions)**            | Logs generated from your Vercel Functions invocations. Log details include additional runtime Request Id details and other basic info |
| **[Routing Middleware](/docs/routing-middleware)** | Logs generated as a result of your Routing Middleware invocations                                                                     |
| **Vercel CDN Cache**                               | Logs generated from proxy serving cache                                                                                               |

### Request Type

You can filter your logs based on framework-defined mechanism or rendering strategy used such as API routes, Incremental Static Regeneration (ISR), and cron jobs.

### Request Method

You can filter your logs based on the request method used by a function such as `GET` or `POST`.

### Request Path

You can filter your logs based on the request path used by a function such as `/api/my-function`.

### Cache

You can filter your logs based on the cache behavior such as `HIT` or `MISS`. See [`x-vercel-cache`](/docs/headers/response-headers#x-vercel-cache) for the possible values.

### Logs from your browser

You can filter logs to only show requests made from your current browser by clicking the user button. This is helpful for debugging your own requests, especially when there's high traffic volume. The filter works by matching your IP address and User Agent against incoming requests.

> **💡 Note:** The matching is based on your IP address and User Agent. In some cases, this
> data may not be accurate, especially if you're using a VPN or proxy, or if
> other people in your network are using the same IP address and browser.

## Search log fields

You can use the main search field to filter logs by their messages. In the current search state, filtered log results are sorted chronologically, with the most recent first. Filtered values can also be searched from the main search bar.

| **Value**                        | **Description**                                                                                                             |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **[Function](#function)**        | The function name                                                                                                           |
| **[RequestPath](#request-path)** | The request path name                                                                                                       |
| **[RequestType](#request-type)** | The request rendering type. For example API endpoints or Incremental Static Regeneration (ISR)                              |
| **[Level](#level)**              | The level type. Can be Info, Warning, or Error                                                                              |
| **[Resource](#resource)**        | Can be Vercel CDN Cache, [Vercel Function](/docs/functions), [Routing Middleware](/docs/routing-middleware)                 |
| **[Host](#host)**                | Name of the [domain](/docs/domains) or subdomain for which the log was generated                                            |
| **[Deployment](#deployment)**    | The name of your deployment                                                                                                 |
| **[Method](#request-method)**    | The request method used. For example `GET`, `POST` etc.                                                                     |
| **[Cache](#cache)**              | The Vercel CDN Cache status, see [`x-vercel-cache`](/docs/headers/response-headers#x-vercel-cache) for the possible values. |
| **Status**                       | HTTP status code for the log message                                                                                        |
| **RequestID**                    | Unique identifier of request. This is visible on a 404 page, for example.                                                   |

> **💡 Note:** This  feature is limited to the
> &#x20;and&#x20;
> field. Other fields can be filtered using the left sidebar or the filters in
> the search bar.

## Log details

You can view details for each request to analyze and improve your debugging experience. When you click a log from the list, the following details appear in the right sidebar:

| **Info**               | **Description**                                                                                                             |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **Request Path**       | Request path of the log                                                                                                     |
| **Time**               | Timestamp at which the log was recorded in UTC                                                                              |
| **Status Code**        | HTTP status code for the log message                                                                                        |
| **Host**               | Name of the [domain](/docs/domains) or subdomain for which the log was generated                                            |
| **Request Id**         | Unique identifier of request created only for runtime logs                                                                  |
| **Request User Agent** | Name of the browser from which the request originated                                                                       |
| **Search Params**      | Search parameters of the request path                                                                                       |
| **Firewall**           | If request was allowed through firewall                                                                                     |
| **Vercel Cache**       | The Vercel CDN Cache status, see [`x-vercel-cache`](/docs/headers/response-headers#x-vercel-cache) for the possible values. |
| **Middleware**         | Metadata about middleware execution such as location and external api                                                       |
| **Function**           | Metadata about function execution including function name, location, runtime, and duration                                  |
| **Deployment**         | Metadata about the deployment that produced the logs including id, environment and branch                                   |
| **Log Message**        | The bottom panel shows a list of log messages produced in chronological order                                               |

### Show additional logs

Towards the end of the log results window is a button called **Show New Logs**. By default, it is set to display log results for the past **30 minutes**.

Click this button, and it loads new log rows. The latest entries are added based on the selected filters.

## Log sharing

You can share a log entry with other [team members](/docs/rbac/managing-team-members) to view the particular log and context you are looking at. Click on the log you want to share, copy the current URL of your browser, and send it to team members through the medium of your choice.

## Limits

Logs are streamed. Each `log` output can be up to 256KB, and each request can log up to 1MB of data in total, with a limit of 256 individual log lines per request. If you exceed the log entry limits, you can only query the most recent logs.

Runtime logs are stored with the following observability limits:

| Plan                                   | Retention time  |
| -------------------------------------- | --------------- |
| **Hobby**                              | 1 hour of logs  |
| **Pro**                                | 1 day of logs   |
| **Pro** with Observability Plus        | 30 days of logs |
| **Enterprise**                         | 3 days of logs  |
| **Enterprise** with Observability Plus | 30 days of logs |

Users who have purchased the [Observability Plus](/docs/observability/observability-plus) add-on can view up to 14 consecutive days of runtime logs over the 30 days, providing extended access to historical runtime data for enhanced debugging capabilities.

> **💡 Note:** The above limits are applied immediately when [upgrading
> plans](/docs/plans/hobby#upgrading-to-pro). For example, if you upgrade from
> [Hobby](/docs/plans/hobby) to [Pro](/docs/plans/pro-plan), you will have access to
> the Pro plan limits, and access historical logs for up to 1 day.


--------------------------------------------------------------------------------
title: "Manage and optimize usage for Observability"
description: "Learn how to understand the different charts in the Vercel dashboard, how usage relates to billing, and how to optimize your usage of Web Analytics and Speed Insights."
last_updated: "2026-02-03T02:58:45.845Z"
source: "https://vercel.com/docs/manage-and-optimize-observability"
--------------------------------------------------------------------------------