# Dashboard access requires sign-in

You can also investigate this project using the Vercel CLI. The commands below require a CLI session with access to the project.

If you don't have the CLI installed, run:

```sh
npm i -g vercel
```

Sign in with `vc login` if needed.

## Vercel Functions

### Query function invocations by route

```sh
vc metrics vercel.function_invocation.count --scope sanity-sandbox --project sanity-astro-example --group-by route --environment production --since 12h --json
```

### Query P75 function duration by route

```sh
vc metrics vercel.function_invocation.function_duration_ms --scope sanity-sandbox --project sanity-astro-example --aggregation p75 --group-by route --order-by value --environment production --since 12h --json
```

### Query 5xx function invocations by route and error code

```sh
vc metrics vercel.function_invocation.count --scope sanity-sandbox --project sanity-astro-example --group-by route --group-by errorCode --query 'httpStatus >= 500' --environment production --since 12h --json
```

### Discover Vercel Functions metrics and dimensions

```sh
vc metrics schema vercel.function_invocation --scope sanity-sandbox --json
```

