vercel metrics
The vercel metrics command lets you query observability data for your teams and projects. You can also inspect the schema to list available metrics, or inspect a metric or metric prefix to discover valid aggregations and dimensions before running a query.
This command requires Observability Plus.
Metrics are available on all plans with Observability Plus
# Query metrics for the linked project
vercel metrics vercel.request.count
# Query a specific project by name or ID
vercel metrics vercel.request.count --project my-app --group-by route --since 24h
# Query metrics across all projects in the current team
vercel metrics vercel.request.count --all --group-by project_id --since 24h
# Inspect the schema for a metric prefix
vercel metrics schema vercel.requestUsing the vercel metrics command to query observability data or inspect the
available schema for a metric.
By default, vercel metrics prints a human-readable table or time series summary. Use --format json to output structured JSON for automation or agents.
These options only apply to the vercel metrics command.
The <metric> positional argument specifies the metric id to query. This argument is required.
vercel metrics vercel.request.countTo list all available metrics, use:
vercel metrics schemaTo inspect a metric or metric prefix and see its available aggregations and dimensions, use:
vercel metrics schema vercel.requestThe --aggregation option, shorthand -a, specifies the aggregation function for the selected metric.
vercel metrics vercel.request.route_cpu_duration_ms --aggregation p95If omitted, the CLI uses the default aggregation from the metric schema.
The --group-by option groups results by one or more dimensions. Repeat it to group by multiple dimensions.
vercel metrics vercel.request.count --group-by route
vercel metrics vercel.request.count --group-by project_id --group-by routeThe --filter option, shorthand -f, applies an OData filter expression.
vercel metrics vercel.request.count --filter "route eq '/api/logs'"The --since option sets the start of the time range. You can use a relative duration like 1h, 24h, or 7d, or an ISO timestamp. If omitted, the CLI defaults to the last hour.
vercel metrics vercel.request.count --since 24hThe --until option sets the end of the time range. If omitted, the command uses the current time.
vercel metrics vercel.request.count --since 24h --until 2026-03-19T12:00:00ZThe --granularity option, shorthand -g, controls the time bucket size. If omitted, the CLI computes an appropriate granularity for the selected time range.
vercel metrics vercel.request.count --granularity 1h --since 7dThe --limit option sets the maximum number of grouped results returned per time bucket. The default is 10.
vercel metrics vercel.request.count --group-by route --limit 50The --project option, shorthand -p, specifies the project name or project ID to query. It defaults to the linked project when --all is not set.
vercel metrics vercel.request.count --project my-app
vercel metrics vercel.request.count --project prj_123456789The --all option queries across all projects in the current team scope. It cannot be combined with --project.
vercel metrics vercel.request.count --all --group-by project_idThe --format option outputs JSON instead of text. This is useful for automation and agents.
vercel metrics vercel.request.count --format json
vercel metrics schema vercel.request --format jsonUse the schema subcommand to:
- list all available metrics with
vercel metrics schema - inspect the dimensions and aggregations supported for a specific metric or metric prefix with
vercel metrics schema <metric-id-or-prefix>
vercel metrics schema
vercel metrics schema vercel.request
vercel metrics schema vercel.request.count --format jsonThis is useful when building queries interactively or scripting queries that need to validate available fields first.
Query request volume by route for the last 24 hours:
vercel metrics vercel.request.count --aggregation sum --group-by route --since 24hQuery p95 latency by route for a specific project:
vercel metrics vercel.request.route_cpu_duration_ms --project my-app --aggregation p95 --group-by route --since 24hQuery team-wide traffic grouped by project:
vercel metrics vercel.request.count --all --aggregation sum --group-by project_id --since 24hInspect the schema before building a query:
vercel metrics schema vercel.requestThe following global options can be passed when using the vercel metrics command:
For more information on global options and their usage, refer to the options section.
Was this helpful?