home / skills / jeremylongshore / claude-code-plugins-plus-skills / sentry-rate-limits

This skill helps optimize Sentry rate limits and quota usage by configuring sampling, deduplication, and filtering to reduce costs.

npx playbooks add skill jeremylongshore/claude-code-plugins-plus-skills --skill sentry-rate-limits

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
1.6 KB
---
name: sentry-rate-limits
description: |
  Manage Sentry rate limits and quota optimization.
  Use when hitting rate limits, optimizing event volume,
  or managing Sentry costs.
  Trigger with phrases like "sentry rate limit", "sentry quota",
  "reduce sentry events", "sentry 429".
allowed-tools: Read, Write, Edit, Grep
version: 1.0.0
license: MIT
author: Jeremy Longshore <[email protected]>
---

# Sentry Rate Limits

## Prerequisites

- Understanding of current event volume
- Sentry billing plan known
- High-volume endpoints identified
- Noisy error patterns documented

## Instructions

1. Check current usage via Sentry API or dashboard stats
2. Implement error sampling with sampleRate for non-critical errors
3. Configure dynamic transaction sampling with tracesSampler
4. Add ignoreErrors patterns for common noisy errors
5. Enable deduplication integration to reduce duplicates
6. Apply client-side filtering in beforeSend hook
7. Set project rate limits via API or dashboard
8. Enable inbound filters for legacy browsers and extensions
9. Monitor event volume and set up quota alerts
10. Adjust sample rates based on billing period usage

## Output
- Optimized sample rates configured
- Rate limiting rules applied
- Event filtering implemented
- Quota usage monitoring setup

## Error Handling

See `{baseDir}/references/errors.md` for comprehensive error handling.

## Examples

See `{baseDir}/references/examples.md` for detailed examples.

## Resources
- [Sentry Quota Management](https://docs.sentry.io/product/accounts/quotas/)
- [Sampling Strategies](https://docs.sentry.io/platforms/javascript/configuration/sampling/)

Overview

This skill helps you manage Sentry rate limits and optimize quota usage to control costs and reduce noise. It provides practical steps to measure event volume, apply sampling and filtering, and enforce project-level rate rules. Use it to prevent 429s, lower billing spikes, and keep important telemetry intact.

How this skill works

The skill inspects current Sentry usage and high-volume endpoints, then recommends and configures sampling, filtering, and deduplication to reduce event traffic. It guides you through client-side hooks (beforeSend), dynamic transaction sampling (tracesSampler), ignorePatterns, and project quota settings. It also sets up monitoring and alerts so you can adjust rates during billing periods.

When to use it

  • You are seeing Sentry 429 responses or quota overages
  • Event volume spikes causing unexpected billing increases
  • You need to limit noisy or duplicate errors without losing critical data
  • Preparing for release windows with anticipated traffic surges
  • Implementing cost controls or compliance-driven telemetry limits

Best practices

  • Start by measuring baseline event volume and identifying noisy endpoints
  • Apply conservative sampling (sampleRate) for non-critical errors first
  • Use tracesSampler for dynamic transaction sampling based on user/session factors
  • Add targeted ignoreErrors and client-side filtering in beforeSend to drop known noise
  • Enable deduplication and inbound filters to eliminate duplicate and irrelevant events
  • Monitor quota usage and create alerts to adjust sampling before 100% consumption

Example use cases

  • Reduce error event volume from a high-traffic API endpoint by applying endpoint-based sampling
  • Prevent billing spikes during a marketing campaign by temporarily lowering sample rates
  • Filter out browser extension and legacy browser errors using inbound filters and ignore patterns
  • Eliminate duplicate reports from retries by enabling deduplication integration
  • Set project-level rate limits via API to cap events from experimental releases

FAQ

How do I decide which sampleRate to use?

Start with a modest reduction (e.g., 0.5) for non-critical flows, monitor the impact on signal and cost, then iterate. Use higher fidelity for transactions and critical errors.

Will filtering in beforeSend affect server-side events?

Client-side beforeSend only affects events captured in that SDK. Server-side or other SDKs need similar filtering or project-level rules to achieve the same effect.