---
name: sentry-alerts-issues
description: Use when configuring Sentry alerts, managing issues, or setting up notifications. Covers alert rules, issue triage, and integrations.
allowed-tools:
  - Read
  - Write
  - Edit
  - Bash
  - Grep
  - Glob
---

# Sentry - Alerts & Issue Management

Configure alerts, manage issues, and set up notifications.

## Alert Types

### Issue Alerts

Trigger when an issue matches specific conditions:

- New issue created
- Issue changes state (resolved → unresolved)
- Issue frequency exceeds threshold
- Issue affects specific users/releases

### Metric Alerts

Trigger based on aggregate metrics:

- Error count exceeds threshold
- Transaction latency (p50, p95, p99)
- Failure rate percentage
- Apdex score drops

### Uptime Monitoring

Monitor endpoint availability:

- HTTP status codes
- Response time thresholds
- SSL certificate expiration

## Alert Conditions

### Frequency-Based

```
When an issue is seen more than 100 times in 1 hour
```

### User Impact

```
When an issue affects more than 50 unique users in 1 hour
```

### First Seen

```
When a new issue is created
```

### Regression

```
When an issue changes state from resolved to unresolved
```

## Alert Actions

### Notification Channels

- **Email**: Individual or team distribution
- **Slack**: Channel or direct messages
- **PagerDuty**: On-call escalation
- **Discord**: Webhook notifications
- **Microsoft Teams**: Channel posts
- **Webhooks**: Custom integrations

### Issue Actions

- Assign to team member
- Add tags
- Create ticket (Jira, Linear, GitHub)

## Issue States

### Lifecycle

1. **Unresolved**: Active issue needing attention
2. **Resolved**: Fixed in a release
3. **Ignored**: Intentionally dismissed
4. **Archived**: Historical, no longer tracked

### Substates

- **For Review**: Needs triage
- **Escalating**: Increasing in frequency
- **Regressed**: Previously resolved, now recurring
- **New**: First seen recently

## Issue Management

### Merge Issues

Combine duplicate issues with different stack traces:

1. Select issues to merge
2. Choose primary issue
3. All events appear under primary

### Ignore Rules

```
Ignore this issue:
- Forever
- Until it happens again
- For the next 24 hours
- Until it affects 100 users
```

### Ownership Rules

```
# Define in project settings
path:src/payments/* #payments-team
path:src/auth/* user@example.com
tags.component:checkout #checkout-team
```

## API Integration

### List Issues

```bash
curl "https://sentry.io/api/0/projects/{org}/{project}/issues/" \
  -H "Authorization: Bearer $SENTRY_AUTH_TOKEN"
```

### Update Issue

```bash
curl -X PUT "https://sentry.io/api/0/issues/{issue_id}/" \
  -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"status": "resolved"}'
```

### Create Alert Rule

```bash
curl -X POST "https://sentry.io/api/0/projects/{org}/{project}/rules/" \
  -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "High Error Rate",
    "conditions": [...],
    "actions": [...],
    "frequency": 30
  }'
```

## Integration Examples

### Slack Alert

```json
{
  "action": "notify_slack",
  "workspace": "your-workspace",
  "channel": "#alerts",
  "tags": ["level", "environment"]
}
```

### PagerDuty Escalation

```json
{
  "action": "notify_pagerduty",
  "service": "your-service-key",
  "severity": "critical"
}
```

### Jira Ticket Creation

```json
{
  "action": "create_jira_ticket",
  "integration": "jira-integration-id",
  "project": "PROJ",
  "issueType": "Bug"
}
```

## Best Practices

1. Start with conservative thresholds, tune over time
2. Use different channels for different severities
3. Set up on-call rotation for critical alerts
4. Review and archive stale issues regularly
5. Define ownership rules for automatic assignment
6. Create runbooks for common alert types
7. Use metric alerts for SLO monitoring


---
Source attribution: TheBushidoCollective
Original project: https://github.com/TheBushidoCollective/han/blob/19caa51d5fd144ef6b2764f2332f4c856aa5d1af/plugins/specialized/sentry/skills/alerts-issues/SKILL.md
License: Apache-2.0
License information: https://www.apache.org/licenses/LICENSE-2.0
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

# Functional Source License, Version 1.1, ALv2 Future License

## Abbreviation

FSL-1.1-ALv2

## Notice

Copyright 2025 The Bushido Collective

## Terms and Conditions

### Licensor ("We")

The party offering the Software under these Terms and Conditions.

### The Software

The "Software" is each version of the software that we make available under
these Terms and Conditions, as indicated by our inclusion of these Terms and
Conditions with the Software.

### License Grant

Subject to your compliance with this License Grant and the Patents,
Redistribution and Trademark clauses below, we hereby grant you the right to
use, copy, modify, create derivative works, publicly perform, publicly display
and redistribute the Software for any Permitted Purpose identified below.

### Permitted Purpose

A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
means making the Software available to others in a commercial product or
service that:

1. substitutes for the Software;

2. substitutes for any other product or service we offer using the Software
   that exists as of the date we make the Software available; or

3. offers the same or substantially similar functionality as the Software.

Permitted Purposes specifically include using the Software:

1. for your internal use and access;

2. for non-commercial education;

3. for non-commercial research; and

4. in connection with professional services that you provide to a licensee
   using the Software in accordance with these Terms and Conditions.

### Patents

To the extent your use for a Permitted Purpose would necessarily infringe our
patents, the license grant above includes a license under our patents. If you
make a claim against any party that the Software infringes or contributes to
the infringement of any patent, then your patent license to the Software ends
immediately.

### Redistribution

The Terms and Conditions apply to all copies, modifications and derivatives of
the Software.

If you redistribute any copies, modifications or derivatives of the Software,
you must include a copy of or a link to these Terms and Conditions and not
remove any copyright notices provided in or with the Software.

### Disclaimer

THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.

IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.

### Trademarks

Except for displaying the License Details and identifying us as the origin of
the Software, you have no right under these Terms and Conditions to use our
trademarks, trade names, service marks or product names.

## Grant of Future License

We hereby irrevocably grant you an additional license to use the Software under
the Apache License, Version 2.0 that is effective on the second anniversary of
the date we make the Software available. On or after that date, you may use the
Software under the Apache License, Version 2.0, in which case the following
will apply:

Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.



# Mega AI Hub resource metadata

Creator / publisher: TheBushidoCollective
Original project: https://github.com/TheBushidoCollective/han/blob/19caa51d5fd144ef6b2764f2332f4c856aa5d1af/plugins/specialized/sentry/skills/alerts-issues/SKILL.md
Attribution basis: Source repository record

Fields of work: Development & Engineering, Product Management, Customer Support
Roles: Backend Developer, DevOps / SRE, Product Manager, QA / Test Engineer, Technical Support
Specialties: API
Tools: Sentry
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: f4b00476df9be0404e456931f8648674716aed2812772df6af4d31917e2e1edd
