---
name: sentry-top-issues-by-users
description: "Every Monday: the 10 unresolved Sentry issues that affected the most users in the last 7 days, with owner and whether each is rising or falling. Use when the user asks for this, or when it runs on a schedule."
---

# Sentry top issues by users affected

Every Monday: the 10 unresolved Sentry issues that affected the most users in the last 7 days, with owner and whether each is rising or falling.

Sentry's default sort is by last seen, which puts a chatty cron job above a bug that 400 customers hit once each. For planning, the question is different: which errors reached the most people this week, and is anyone fixing them.

The agent ranks the week by users affected, adds the assignee and whether events are rising or falling against the week before, and keeps it to ten rows. It is a planning input rather than an alert, so it arrives once a week, before the sprint is shaped.

## Two ways to get the data

Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.

## Route A: API or MCP server

### What you need

- A Sentry token with `event:read` and `org:read`, or the Sentry MCP server or connector.
- Users identified in the SDK (`Sentry.setUser({ id })`); without it, user counts fall back to IP addresses or stay at zero.

If something is missing, say what and stop; do not invent numbers.

### Steps

1. **Rank by users** (Sentry): `GET /api/0/organizations/{org}/issues/?query=is:unresolved&statsPeriod=7d&sort=user&limit=10&groupStatsPeriod=14d` across the projects you choose. Read `userCount` and `count` for the 7-day window.
2. **Compare with the week before**: With `groupStatsPeriod=14d`, each issue's `stats` holds 14 daily event counts. Compare the last 7 days with the 7 before and call the issue rising (up 20% or more), falling (down 20% or more) or flat.
3. **Add the owner**: Use `assignedTo` when it is set (a user or a team). Otherwise mark it unassigned and, if you keep code owners, name the team that owns the file in `culprit`.
4. **Find what went quiet** (Sentry): Query `is:unresolved lastSeen:+7d lastSeen:-14d` for issues that were active last week but not this week. They are candidates to resolve, so they stop cluttering the list.
5. **Write the list**: Ten rows with short ID, title, users, events, trend and owner, then the unassigned rising issues as the ones to bring to planning.

## Route B: the browser

### What you need

- Signed in to Sentry as a member of the organization; the Users column only has numbers when your SDK sets a user.

If something is missing, say what and stop; do not invent numbers.

### Steps

Start at https://sentry.io/issues/. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.

1. **Set the week**: On the Issues page of your organization, pick the projects in the project selector and set the time range picker to **7D**. Keep the search at `is:unresolved` and set **Sort** to `Users`.
2. **Read the top ten**: For the first ten rows note the short ID, title, **Users**, **Events** and the assignee avatar (hover it for the name or team; an empty circle means unassigned).
3. **Read the trend**: Switch the **Graph** column from `24h` to `14d`. Each row's sparkline shows daily events for two weeks: compare the right half with the left half and call it rising (up 20% or more), falling (down 20% or more) or flat. Open an issue and hover its chart when the sparkline is too small to tell.
4. **Find what went quiet**: Change the search to `is:unresolved lastSeen:+7d lastSeen:-14d` with the time range still at 7D. These were active last week but not this week and are candidates to resolve.
5. **Write the list**: Ten rows with short ID, title, users, events, trend and owner, then the unassigned rising issues as the ones to bring to planning, then the quiet list.

Note: The sparkline comparison is read by eye, so treat the 20% line as approximate; the API route counts the daily buckets exactly. The time range picker caps at 90 days and the list pages 25 rows at a time, which is more than this report needs.

## The report

- **Top 10** unresolved issues by users affected in the last 7 days.
- For each: short ID, title, users, events, rising, falling or flat, and owner.
- **Unassigned and rising**: the issues to bring to sprint planning.
- **Gone quiet**: issues seen last week but not this week, worth resolving.

## Post it to Briefkin

When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.

```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
  -H "authorization: Bearer $BRIEFKIN_TOKEN" \
  -H "content-type: application/json" \
  -d @- <<'JSON'
{
  "v": 1,
  "event_id": "sentry-top-issues-by-users/<date of this run, e.g. 2026-10-16>",
  "item_key": "sentry-top-issues-by-users",
  "project": "Acme",
  "source": "Sentry top issues by users affected skill",
  "kind": "update",
  "title": "Checkout errors lead the list for a second week",
  "summary": "The top issue reached **612 users** this week. Three issues are rising, and the biggest riser has no owner.",
  "widget": [
    {
      "type": "Table",
      "props": {
        "columns": [
          "Issue",
          "Users",
          "Events",
          "Trend",
          "Owner"
        ],
        "align": [
          "left",
          "right",
          "right",
          "left",
          "left"
        ],
        "rows": [
          [
            "ACME-WEB-39C PaymentIntent already succeeded",
            612,
            1904,
            "flat",
            "#payments"
          ],
          [
            "ACME-WEB-3A1 Failed to fetch /api/cart",
            433,
            2210,
            "rising +64%",
            "Unassigned"
          ],
          [
            "ACME-API-1D8 Timeout calling the tax service",
            290,
            3105,
            "falling -31%",
            "Ines"
          ],
          [
            "ACME-WEB-37F Hydration mismatch in PriceTag",
            214,
            260,
            "flat",
            "#web"
          ],
          [
            "ACME-IOS-B21 Image decode failed",
            188,
            240,
            "rising +22%",
            "Joe"
          ],
          [
            "ACME-API-1C4 Webhook signature mismatch",
            97,
            410,
            "falling -48%",
            "Ana"
          ],
          [
            "ACME-WEB-3B0 ResizeObserver loop limit exceeded",
            79,
            5120,
            "flat",
            "Unassigned"
          ],
          [
            "ACME-API-1E2 Deadlock on orders insert",
            64,
            66,
            "new",
            "Rui"
          ],
          [
            "ACME-WEB-3A9 Cannot read properties of null (reading 'id')",
            51,
            88,
            "rising +25%",
            "#web"
          ],
          [
            "ACME-IOS-B1F Keychain read failed",
            40,
            52,
            "falling -12%",
            "Joe"
          ]
        ]
      }
    },
    {
      "type": "Callout",
      "props": {
        "text": "Failed cart fetches (3A1) rose 64% week over week with no owner: bring it to planning.",
        "tone": "warn"
      }
    }
  ]
}
JSON
```

Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.

## Run it on a schedule

Suggested: Mondays at 8:30 (`30 8 * * 1`). From cron, with the agent signed in on that machine:

```bash
30 8 * * 1 claude -p "Run the sentry-top-issues-by-users skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```

Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/sentry-top-issues-by-users#schedule

Source: https://briefkin.dev/skills/sentry-top-issues-by-users
