| name | sentry |
| description | Sentry — error tracking, APM, SDK setup, source maps. |
Sentry — Error Tracking & Performance Monitoring
Detection Signals
| Signal | Location |
|---|
SENTRY_DSN env var | .env, .env.example, CI secrets |
@sentry/ prefix | package.json dependencies |
sentry-sdk | requirements.txt, pyproject.toml |
sentry/sentry-laravel or sentry/sentry-php | composer.json |
sentry service | docker-compose.yml |
.sentryclirc or sentry.properties | repo root |
Core Concepts
| Term | Meaning |
|---|
| DSN | Data Source Name — the endpoint URL that SDKs send events to |
| Environment | production, staging, development — segments events |
| Release | Tagged version (v1.2.3 or git SHA) — ties issues to deploys |
| Issue | Grouped set of similar events (same error + stacktrace fingerprint) |
| Transaction | A performance trace for one request or operation |
| Span | A timed segment inside a transaction (DB query, HTTP call) |
SDK Initialization (key rules)
- Initialize Sentry before any other imports/modules that could throw
- Set
sendDefaultPii: false — the safe GDPR default
- Set
environment from an env var per deployment target
- Set
release from git SHA or semver tag via CI
- Never hardcode
SENTRY_DSN in source — treat it as a credential
Load references/sdk-setup.md for: full initialization code for Node.js, Browser, Python, Go, PHP/Laravel; custom context (setUser, setTag, setExtra); custom span examples.
Sampling
| Traffic volume | tracesSampleRate |
|---|
| < 1k req/day | 1.0 |
| 1k – 50k req/day | 0.2 |
| > 50k req/day | 0.05 + dynamic sampler |
Error capture always uses sampleRate: 1.0 — never drop errors. Exclude /health, /ping, /metrics from performance traces.
Load references/configuration.md for: dynamic sampler example, release tracking CLI commands, GitHub Actions deploy integration, source maps upload, alerts setup, self-hosted Docker setup.
Before Declaring Done