Query Reference
In Query, you first select an event type, then a metric from that event type. For example, select Function Invocations and Active CPU Time to query the CPU time used by Vercel Functions.
The metric picker displays only the event types and metrics available to your team. The following tables use the labels shown in the picker for current event types. Deprecated event types may also appear for historical data.
For the corresponding CLI metric names, see available metrics for vercel metrics (vc metrics). Run vercel metrics schema to inspect the metrics, dimensions, and aggregations available to your team.
| Event type | Metrics |
|---|---|
| Requests | Count, External Rewrite Connect Time, External Rewrite DNS Time, Fast Data Transfer (Incoming), Fast Data Transfer (Outgoing), Fast Data Transfer (Total), Routing CPU Duration |
| Image Transformations | Count, Compression Ratio, Duration, Optimized Size, Size Change, Source Size |
| ISR Operations | Read Bandwidth, Write Bandwidth, Read Units, Write Units |
| Event type | Metrics |
|---|---|
| Function Invocations | Count, Duration (ms), Active CPU Time, Duration (Gb-hrs), Time to First Byte, Incoming Fast Origin Transfer, Outgoing Fast Origin Transfer, Total Fast Origin Transfer, Peak Memory, Provisioned Memory |
| Middleware Invocations | Count, Duration, Active CPU Time, Time to First Byte, Incoming Fast Origin Transfer, Outgoing Fast Origin Transfer, Total Fast Origin Transfer |
| External APIs | Count, Duration, Transfer Bytes |
| Queue Actions | Count, Messages Sent, Messages Received, Messages Deleted, Notifications, Visibility Changes, Message Age When Received, Redeliveries, Retry Depth |
| Workflows | Hooks Conflict, Hooks Created, Hooks Disposed, Hooks Received, Runs Cancelled, Runs Completed, Runs Created, Runs Failed, Runs Started, Steps Cancelled, Steps Completed, Steps Created, Steps Failed, Steps Retrying, Steps Started, Waits Completed, Waits Created |
| Sandboxes | Active CPU Time, CPU Usage, Data Transfer In, Data Transfer Out, Peak Memory, Provisioned Memory |
| Event type | Metrics |
|---|---|
| PrivateLink Data Transfer | Count, Bytes |
| Event type | Metrics |
|---|---|
| AI Gateway Requests | Count, Audio Duration, Audio Input Tokens, Audio Output Tokens, Cache Creation 1h Input Tokens, Cache Creation Tokens, Cached Input Tokens, Cost, Duration, Gateway Cost, Gateway Tool Call Cost, Gateway Tool Calls, Google Maps Search Calls, Image Count, Image Input Tokens, Input Tokens, Model Allowlist Cost, Output Tokens, Provider Allowlist Cost, Quota Write Cost, Realtime Client Messages, Realtime Session Duration, Region Pinning Cost, Reporting Write Cost, Reranking Query Count, Surcharge Cost, Time to First Token, Video Count, Video Duration, Video FPS, Video Input Tokens, Web Search Calls, ZDR Cost |
| Event type | Metrics |
|---|---|
| Blocked Connections | Count |
| Firewall Actions | Count |
| BotID Checks | Count |
| Event type | Metrics |
|---|---|
| Web Analytics Page Views | Count, Visitors |
| Web Analytics Custom Events | Count, Visitors |
| Speed Insights | Time to First Byte, Cumulative Layout Shift, First Contentful Paint, First Input Delay, Interaction to Next Paint, Largest Contentful Paint |
| Event type | Metrics |
|---|---|
| Metrics | The custom metrics available to your team |
The aggregation determines how Query combines the selected metric's values. The aggregation picker displays only the options supported by the selected metric.
| Aggregation | Description |
|---|---|
| Count | The number of data points emitted for the selected custom metric. For built-in event types, select the Count metric and the Sum aggregation instead. |
| Sum | The total of the metric values. |
| Average | The arithmetic mean of the metric values. |
| Min | The smallest metric value. |
| Max | The largest metric value. |
| P50 | The value below which 50% of the metric values fall. |
| P75 | The value below which 75% of the metric values fall. |
| P90 | The value below which 90% of the metric values fall. |
| P95 | The value below which 95% of the metric values fall. |
| P99 | The value below which 99% of the metric values fall. |
| Std Dev | The standard deviation of the metric values. |
| Per Second | The metric value expressed as a rate per second. |
| Percent | Each group as a percentage of the ungrouped total. Values excluded by the filter are also excluded from the total. |
| Unique | The number of distinct values. Query uses this aggregation for the Visitors metrics. |
Aggregations are calculated within each point on the chart (hourly, daily, etc) and also across the entire query window.
The filter bar defines the conditions to filter your query data. It only fetches data that meets a specified condition based on several fields and operators:
| Operator | Description |
|---|---|
is, is not | Match or exclude one value. |
is any of, is not any of | Match or exclude any value in a list. |
is set, is not set | Match based on whether the field has a value. |
contains, not contains | Match based on whether text contains a value. |
starts with, not starts with | Match based on the beginning of a text value. |
ends with, not ends with | Match based on the end of a text value. |
matches pattern, not matches pattern | Match based on a text pattern. |
>, >=, <, <= | Compare numerical values. |
includes any, includes all | Match array fields that include selected values. |
excludes any, excludes all | Match array fields that exclude selected values. |
The Group By clause calculates statistics for each combination of field values. Each group is displayed as a separate color in the chart view, and has a separate row in the table view.
For example, grouping by Request Hostname and HTTP Status displays data for each combination of hostname and status code.
The available fields depend on the selected event type. The following fields are common across one or more event types:
| Field Name | Description |
|---|---|
Request Hostname | Group by the request's domains and subdomains |
Project | Group by the request's project |
Deployment ID | Group by the request's deployment ID |
HTTP Status | Group by the request's HTTP response code |
Route | The 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 route is /blog/[slug] |
Request Path | The 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 |
Cache Result | The cache status for the request |
Environment | Group by the environment (production or preview) |
Request Method | Group by the HTTP request method (GET, POST, PUT, etc.) |
Referrer URL | Group by the HTTP referrer URL |
Referrer Hostname | Group by the HTTP referrer domain |
IP Address | Group by the request's IP address |
IP Country | Group by the request's IP country |
User Agent | Group by the request's user agent |
AS Number | The 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) |
CDN Region | Group by the region the request was routed to |
ISR Cache Region | Group by the ISR cache region |
WAF Action | Group by the action taken by the Vercel Firewall, including allow, bypass, challenge, challenge-solved, challenge-failed, deny, log, rate_limit, and redirect |
WAF Rule ID | Group by the firewall rule ID |
Skew Protection | When active, the request would have been subject to version skew but was protected, otherwise inactive. |
Sandbox Name | Group by the sandbox name |
Sandbox Session ID | Group by the sandbox session ID |
Was this helpful?