home / skills / jeremylongshore / claude-code-plugins-plus-skills / sentry-cost-tuning

This skill helps you cut Sentry costs and control event volume by implementing sampling, filters, and spend alerts to optimize quotas.

npx playbooks add skill jeremylongshore/claude-code-plugins-plus-skills --skill sentry-cost-tuning

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

Files (7)
SKILL.md
1.6 KB
---
name: sentry-cost-tuning
description: |
  Optimize Sentry costs and event volume.
  Use when managing Sentry billing, reducing event volume,
  or optimizing quota usage.
  Trigger with phrases like "reduce sentry costs", "sentry billing",
  "sentry quota", "optimize sentry spend".
allowed-tools: Read, Write, Edit, Grep
version: 1.0.0
license: MIT
author: Jeremy Longshore <[email protected]>
---

# Sentry Cost Tuning

## Prerequisites

- Current Sentry billing plan known
- Event volume metrics available
- High-volume error sources identified
- Cost reduction target defined

## Instructions

1. Review current usage and cost breakdown by event type
2. Implement error sampling to reduce volume (e.g., 50% sampleRate)
3. Configure aggressive transaction sampling (1% or lower for high-volume)
4. Add ignoreErrors and denyUrls patterns for common noise
5. Enable server-side inbound filters in project settings
6. Set project rate limits to cap maximum events
7. Reduce event size with maxValueLength and maxBreadcrumbs limits
8. Disable unused features (replays, profiling) if not needed
9. Configure tiered environment settings (disable in dev, reduce in staging)
10. Set up spend alerts and monitor cost projections monthly

## Output
- Optimized sample rates
- Event filtering rules
- Cost projection updated
- Spend alerts configured

## Error Handling

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

## Examples

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

## Resources
- [Sentry Pricing](https://sentry.io/pricing/)
- [Quota Management](https://docs.sentry.io/product/accounts/quotas/)

Overview

This skill optimizes Sentry costs and controls event volume to meet budget and quota targets. It provides concrete tuning steps—sampling, filtering, and feature adjustments—to reduce billable events while preserving signal quality. Use it to generate actionable configuration changes and cost projections.

How this skill works

The skill inspects current billing plan, event volumes, and high-volume error sources to recommend sampling and filtering strategies. It produces optimized sample rates, ignore patterns, rate limits, and feature toggles, and it outlines spend alerting and projection updates. Output is a concise list of configuration changes and expected cost impact.

When to use it

  • You need to lower Sentry monthly spend quickly
  • Event volume or quota usage is nearing limits
  • You want to preserve signal while reducing noisy events
  • Preparing for a billing plan review or migration
  • Setting guardrails for non-production environments

Best practices

  • Start with observable metrics: review event breakdown by type and source before changing sampling
  • Apply server-side sampling first for predictable reductions; combine with client-side sampling if needed
  • Use ignoreErrors and denyUrls to remove known noise rather than over-sampling
  • Set conservative transaction sampling for high-volume services (e.g., 1% or lower) and raise for critical flows
  • Implement tiered settings: disable or minimize features in dev/staging, keep full fidelity for production-critical paths
  • Create spend alerts and monthly cost projections to validate tuning impact and avoid surprises

Example use cases

  • Implement 50% event sampling for a noisy client SDK while maintaining full traces for key endpoints
  • Add ignoreErrors and denyUrls for known non-actionable exceptions to cut billable events
  • Configure project-level rate limits and server-side inbound filters to cap spikes during incidents
  • Disable replays and profiling in non-production environments to eliminate unnecessary costs
  • Produce a cost projection showing expected monthly savings after sampling and filtering changes

FAQ

How do I choose a safe sample rate?

Base the rate on event volume and business-critical paths: begin conservatively (e.g., 50%), monitor signal loss, and iterate. Use lower rates for very high-volume services and keep higher rates for key transactions.

Will filtering lose important data?

Proper filtering targets known noisy sources (e.g., bots, repeat non-actionable errors). Combine rules with selective full-fidelity sampling for critical transactions to retain important debugging data.