---
title: Monitoring your Merge Queue
description: Monitor key metrics of your merge queue to optimize throughput and reduce latency, ensuring a streamlined development cycle.
---

import { Image } from "astro:assets"
import dashboardStatsScreenshot from "../../images/merge-queue/monitoring/dashboard.png"

Monitoring your merge queue's key metrics helps you identify bottlenecks,
optimize throughput, and maintain an efficient development cycle.

## Key Metrics to Monitor

### PRs Merged Per Day
Track the number of pull requests merged each day. A consistent trend indicates
a stable development environment. Sudden drops or spikes can indicate issues
that need attention.

### CI Runtime
Monitor how long your Continuous Integration tests take to run. A sudden
increase in runtime can slow down your entire merge queue and delay other PRs.

### Queue Checks Outcome
Track the success rate of PRs in the queue. High success rates indicate a
healthy development and review process. Frequent failures may signal a need for
process refinement or CI improvements.

### Queue Size
Monitor the number of PRs waiting in the queue. If the queue grows
significantly or continuously, it indicates a bottleneck or inefficiency in
your process or CI.

### Running Checks
Monitor the number of checks currently running. If you're often at full
capacity, consider increasing the number of parallel checks to improve
throughput.

### Queue Waiting Time
Track how long PRs spend idle in the queue. Extended waiting times increase
overall latency and can delay the delivery of features or fixes.

## Viewing Your Metrics

View these metrics on the merge queue page of your
[dashboard](https://dashboard.mergify.com):

<Image src={dashboardStatsScreenshot} alt="Statistics page on mergify's dashboard"/>

## Monitoring the Queue with the CLI

You can check your merge queue status from the command line using the [Mergify
CLI](/cli).

```bash
mergify queue status
```

This displays:

- **Pause status** — whether the queue is paused, with reason and elapsed time

- **Batches** — batches organized by scope with status indicators and their
  pull requests

- **Waiting PRs** — queued pull requests with priority, queue time, and
  estimated merge time

To filter results to a specific branch:

```bash
mergify queue status --branch main
```

Use `--json` for machine-readable output:

```bash
mergify queue status --json
```

### Inspecting a Pull Request

To see the detailed state of a specific pull request in the queue:

```bash
mergify queue show <pr_number>
```

This displays the PR's position, priority, queue rule, CI checks summary, and
blocking conditions. Use `--verbose` (`-v`) for the full checks table and
conditions tree:

```bash
mergify queue show 123 --verbose
```

## Integrations

import Monitoring from '../integrations/_monitoring.mdx'

<Monitoring />

You can also build your own monitoring solution using the Mergify
[API](/api/usage).
