sentry-multi-env-setup
Configure Sentry across multiple environments.Use when setting up Sentry for dev/staging/production,managing environment-specific configurations, or isolating data.Trigger with phrases like "sentry environments", "sentry staging setup","multi-environment sentry", "sentry dev vs prod".
When & Why to Use This Skill
This Claude skill automates the professional configuration of Sentry across multiple deployment environments such as development, staging, and production. It streamlines the implementation of environment-specific DSNs, optimized sample rates, and intelligent alert routing to ensure robust error tracking and data isolation for modern software development workflows.
Use Cases
- New Project Initialization: Quickly establish a standardized Sentry setup for new applications requiring distinct configurations for dev, staging, and production environments.
- Performance & Quota Management: Automatically configure environment-specific sample rates (e.g., 100% in dev for debugging vs. 10% in prod for performance) to manage Sentry event quotas effectively.
- Intelligent Alerting Workflows: Create production-only alert rules and lower-priority staging notifications to ensure critical production issues are prioritized while maintaining a clean developer feedback loop.
- Data Integrity & Isolation: Implement conditional DSN loading and environment tagging to prevent local development or testing data from polluting production error analytics and dashboards.
| name | sentry-multi-env-setup |
|---|---|
| description | | |
| allowed-tools | Read, Write, Edit, Grep |
| version | 1.0.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
Sentry Multi Env Setup
Prerequisites
- Environment naming convention defined
- DSN management strategy
- Sample rate requirements per environment
- Alert routing per environment
Instructions
- Set environment option in SDK init to match deployment target
- Configure environment-specific sample rates (100% dev, 10% prod)
- Choose project structure (single with environments vs separate projects)
- Set up separate DSNs per environment in environment variables
- Implement conditional DSN loading to disable in development
- Add environment context and tags in beforeSend hook
- Configure environment filters in Sentry dashboard
- Create production-only alert rules with appropriate conditions
- Set up lower-priority staging alerts for development feedback
- Document environment configuration and best practices for team
Output
- Environment-specific Sentry configuration
- Separate or shared projects configured
- Environment-based alert rules
- Sample rates optimized per environment
Error Handling
See {baseDir}/references/errors.md for comprehensive error handling.
Examples
See {baseDir}/references/examples.md for detailed examples.