Reference
5 min read

Monitoring Reference

This reference covers the clauses, fields, and variables used to create a Monitoring query.
Table of Contents

On the left navigation bar, you will find a list of example queries to get started:

Query NameDescription
Requests by HostnameThe total number of requests grouped by host
Requests by ProjectThe total number of requests grouped by project_id
Requests by IP AddressThe total number of requests grouped by public_ip
Requests by Bot/CrawlerThe total number of requests grouped by bot_name
Requests by User AgentThe total number of requests grouped by user_agent
Requests by RegionThe total number of requests grouped by region
Bandwidth by Project, HostnameThe outgoing bandwidth grouped by host and project_id
Bandwidth by Path, HostnameThe outgoing bandwidth grouped by host and source_path
Request Cache HitsThe total number of request cache hits grouped by host
Request Cache MissesThe total number of request cache misses grouped by host
429 Status Codes by Host, PathThe total 429 (Too Many Requests) status code requests grouped by host and source_path
5XX Status Codes by Host, PathThe total 5XX (server-related HTTPS error) status code requests grouped by host and source_path
Execution by Host, PathThe total billed Serverless Function usage grouped by host and source_path

The Visualize clause selects which field you will calculate within your query. It allows you to select one of the following at a time:

Field NameDescription
requestsThe HTTP requests
bandwidth_incomingBandwidth sent from the client to Vercel
bandwidth_outgoingBandwidth sent from Vercel to the client
bandwidth_totalSum of bandwidth_incoming and bandwidth_outgoing
serverless_function_executionThe billed Serverless Function usage in GB-Hrs
serverless_function_durationThe time spent executing Serverless Functions
memory_sizeThe size of memory provisioned for the Serverless Functions
blocked_connectionsAll connections blocked by either the system or user

The Where clause defines the conditions to filter your query data. It only fetches data that meets a specified condition. It allows you to filter results based on several fields, variables, and operators, as listed in the table:

Field/Variable NameDescription
requestsNumber of requests
bandwidth_totalSum of the incoming and outgoing bandwidth for the request
bandwidth_incomingBandwidth sent from the client to your Vercel account for the request
bandwidth_outgoingBandwidth sent from your Vercel account to the client for the request
hostDomain or subdomain for the request
serverless_function_executionThe billed Serverless Function usage in GB-Hrs
serverless_function_durationThe time spent executing Serverless Functions
memory_sizeThe size of memory provisioned for the Serverless Functions
path_typeThe path type for the request. Learn more about Path Types.
project_idThe project ID for the request
statusThe HTTP response code for the request
source_pathThe mapped path used by the request. For example, if you have a dynamic route like /blog/[slug] and a blog post is /blog/my-blog-post, the source_path is /blog/[slug]
request_pathThe path used by the request. For example, if you have a dynamic route like /blog/[slug] and a blog post is /blog/my-blog-post, the request_path is /blog/my-blog-post
cacheThe cache status for the request
error_detailsThe errors that were thrown on Vercel
deployment_idThe deployment ID of the request
environmentThe environment type of the request
request_methodThe HTTP method for the request (GET, POST, PUT, etc.)
public_ipThe IP address for the request.
user_agentThe user agent for the request
http_refererThe HTTP referer for the request
asnThe autonomous system number (ASN) for the request. This is related to what network the request came from (either a home network or a cloud provider)
regionThe region the request was routed to
bot_nameThe bot crawler name for the request. This field will contain the name of a known crawler (e.g. Google, Bing)
waf_actionThe action taken by the Vercel Firewall (system-blocked or customer-blocked)
OperatorDescription
inThe operator that allows you to specify multiple values
andThe operator that displays a query result if all the filter conditions are TRUE
orThe operator that displays a query result if at least one of the filter conditions are TRUE
notThe operator that displays a query result if the filter condition(s) is NOT TRUE
likeThe operator used to search a specified pattern. This is case-sensitive. For example, host like 'acme.com'. You can also use _ to match any single character and % to match any substrings. For example, host like 'acme_.com' will match with acme1.com, acme2.com, and acme3.com. host like 'acme%' will also have the same matches. To do a case-insensitive search, use ilike
startsWithFilter data values that begin with some specific characters
matchThe operator used to search for patterns based on a regular expression (Re2 syntax). For example, match(user_agent, 'Chrome/97.*')

All your project's resources like pages, functions, and images have a path type.

Path TypeDescription
staticA static asset (.js, .css, .png, etc.)
funcA Serverless Function
externalA resource that is outside of Vercel. This is usually caused when you have rewrite rules
edgeAn Edge Function
prerenderA pre-rendered page built using Incremental Static Regeneration
streaming_funcA streaming Serverless Function
background_funcThe Incremental Static Regeneration Render Function used to create or update a static page

The Group By clause groups the data based on the selected attributes. The available grouping attributes are:

Group NameDescription
hostGroup by the request's domains and subdomains
path_typeGroup by the request's resource type
project_idGroup by the request's project ID
statusGroup by the request's HTTP response code
source_pathGroup by the mapped path used by the request
request_pathGroup by the path used by the request
cacheGroup by the cache hit status (HIT or MISS)
error_detailsGroup by the errors that were thrown on Vercel
deployment_idGroup by the request's deployment ID
environmentGroup by the environment (production or preview)
request_methodGroup by the HTTP request method (GET, POST, PUT, etc.)
http_refererGroup by the HTTP referer
public_ipGroup by the request's IP address
user_agentGroup by the request's user agent
asnThe autonomous system number (ASN) for the request. This is related to what network the request came from (either a home network or a cloud provider)
bot_nameGroup by the request's bot crawler name
regionGroup by the region the request was routed to
waf_actionGroup by the action taken by the Vercel Firewall (system-blocked or customer-blocked)

The Limit clause defines the maximum number of results displayed. If the number of query results is greater than the Limit value, then the remaining results are compiled as Other(s).

Monitoring options including Data Granularity of day or hour
Monitoring options including Data Granularity of day or hour

In the chart view (vertical bar or line), Limit is applied at the level of each day or hour (based the value of the Data Granularity dropdown). When you hover over each step of the horizontal axis, you can see a list of the results returned and associated colors.

In the table view (below the chart), Limit is applied to the sum of requests for the selected time period so that the number of rows in the table does not exceed the value of Limit.

Last updated on March 6, 2023