# `jadpo metrics`

Add up the metrics jadpo dev kept.

Adds up the metrics of the requests `jadpo dev` answered (area 17): the runtime's own, per route, action, query and provider call, and the app's own from `monitoring.jadpo`, a line for each series, with how many values it has and what they come to. The filters choose which requests are added up; `--follow` adds them up again as new ones arrive.

```text
jadpo metrics
```

## Flags

- `--route <route>`: Only this route's requests
- `--action <action>`: Only the requests that ran this action
- `--domain <domain>`: Only those that ran this domain's code
- `--failure <code>`: Only those that failed with this code
- `--slower-than <duration>`: Only those slower than this, such as 200ms
- `--request <id>`: Only the request whose id starts so
- `--follow`: Keep printing as new ones arrive

## On every command

- `--json`: Print data for tools instead of text
- `--full`: Show everything a report shortens
- `--help`: Show every flag, with examples
- `--color <when>`: Choose when to use colour

`jadpo metrics --json` writes one JSON document to standard output instead of text, with the same exit code. The document has `schemaVersion`, `command` (`"metrics"`), `ok`, `data` (what the command produced, `null` when it failed) and `diagnostics` (each error with its `rule`, `reason`, `next` and `help`). A command that needs a terminal refuses `--json` and names the flags that do the same job.

## Examples

```text
# See every metric
jadpo metrics
# See one route's
jadpo metrics --route "POST /greeting"
```

## Errors

- [`cli.metrics_arguments`](/docs/errors/cli.metrics_arguments.md): A `jadpo metrics` command is given something it doesn't take, or a filter it can't read
- [`toolchain.project_not_found`](/docs/errors/toolchain.project_not_found.md): You ran a command that works on a project in a folder with no `app.jadpo`, in it or in any folder above it
