A multi-mode testing platform for Sentry SDK features across 12 languages
Learn by doing. The SDK Playground is a comprehensive testing platform for Sentry SDK features. Test event transformation callbacks, sampling strategies, filter patterns, webhook integrations, and configuration analysis—all in a safe sandbox environment. With 9 specialized testing modes, 50+ pre-built examples, and support for 12 SDK languages, you can master Sentry integration patterns before touching production.
Key Capabilities:
- 9 Testing Modes - Before Send, Fingerprinting, Before Send Transaction, Before Breadcrumb, Traces Sampler, Pattern Tester, Config Analyzer, API Query Tester, Webhooks
- 12 SDK Languages - JavaScript, Python, Ruby, PHP, Go, .NET, Java, Android, Cocoa, React Native, Rust, Elixir
- 50+ Example Templates - Real-world patterns for PII scrubbing, sampling, filtering, and more
- Visual Diff Viewer - Side-by-side comparison of original vs transformed data
- Real-time Validation - Catch syntax errors before execution
- Secure Sharing - Share configurations with automatic PII scrubbing
Requirements: Docker & Docker Compose (that's it!)
# 1. Clone and navigate to the repository
cd sdk-playground
# 2. Build and start all services
docker-compose up -d
# 3. Open the playground
open http://localhost:3000The playground will be available at http://localhost:3000
| Mode | Purpose | Use When |
|---|---|---|
| Before Send | Transform error events | Scrubbing PII, adding tags, filtering errors |
| Fingerprinting | Control issue grouping | Normalizing dynamic data, custom grouping rules |
| Before Send Transaction | Transform performance data | Filtering health checks, adding context |
| Before Breadcrumb | Filter navigation/console logs | Reducing noise, scrubbing URLs |
| Traces Sampler | Dynamic sampling rates | Cost optimization, critical endpoint prioritization |
| Pattern Tester | Test filter patterns | Validating ignoreErrors/denyUrls |
| Config Analyzer | Validate SDK configuration | Reviewing Sentry.init() setup |
| API Query Tester | Test search queries | Building API integrations |
| Webhooks | Test webhook integrations | Debugging signature verification |
Transform error events before they are sent to Sentry. Use it to:
- Scrub PII (emails, IPs, tokens)
- Add custom tags and context
- Filter noisy errors
- Modify exception values
Example:
(event, hint) => {
// Redact sensitive user data
if (event.user?.email) {
event.user.email = '[REDACTED]';
}
return event;
}Control how Sentry groups errors into issues. This is a convenience mode for testing fingerprinting via beforeSend. Use it to:
- Normalize dynamic data (user IDs, database instances)
- Group similar errors together
- Split overly-broad groupings by context
Example:
(event, hint) => {
// Group all database errors together regardless of instance
if (event.message?.includes('Database connection failed')) {
event.fingerprint = ['database-connection-error'];
}
return event;
}Transform transaction events before sending. Use it to:
- Drop health check transactions
- Add business context
- Modify transaction names
- Filter by endpoint
Example:
(transaction, hint) => {
// Drop health check transactions
if (transaction.transaction === 'GET /health') {
return null;
}
return transaction;
}Filter and modify breadcrumbs before they're added to events. Use it to:
- Drop noisy console logs
- Scrub tokens from URLs
- Categorize breadcrumbs
- Reduce breadcrumb volume
Example:
(breadcrumb, hint) => {
// Drop console breadcrumbs
if (breadcrumb.category === 'console') {
return null;
}
// Scrub tokens from navigation URLs
if (breadcrumb.data?.to) {
breadcrumb.data.to = breadcrumb.data.to.replace(/token=[^&]+/, 'token=[REDACTED]');
}
return breadcrumb;
}Implement dynamic sampling strategies for performance monitoring. Use it to:
- Sample critical endpoints at higher rates
- Drop health checks entirely
- Implement user-based sampling
- Optimize tracing costs
Example:
(samplingContext) => {
const name = samplingContext.transactionContext.name;
// Always sample payment endpoints
if (name.includes('/payment')) {
return 1.0; // 100%
}
// Never sample health checks
if (name === 'GET /health') {
return 0.0; // 0%
}
return 0.1; // 10% default
}Output: Visual sampling rate indicator showing the percentage and what portion of transactions will be sent vs dropped.
Test Sentry webhook payloads with HMAC-SHA256 signature generation and verification. Use it to:
- Debug webhook integrations
- Test signature verification code
- Inspect webhook payload structures
- Demonstrate webhook security to customers
Available Templates:
- Issue Alert - Created/Resolved/Assigned
- Metric Alert
- Error Event
- Comment Created
Analyze and validate Sentry.init() configurations. Use it to:
- Validate configuration syntax
- Understand what each option does
- Get SE-focused recommendations
- Identify potential issues
Supported SDKs: JavaScript, Python, Ruby, PHP, Go, .NET, Java, Android, Cocoa
Test and validate Sentry API search queries. Use it to:
- Validate query syntax in real-time
- Get property suggestions for typos
- Execute queries against real data
- Generate ready-to-use cURL commands
Example Queries:
is:unresolved level:error
assigned:me
level:fatal age:-24h
!user.email:*@internal.com
Test ignoreErrors, denyUrls, and allowUrls filter patterns. Use it to:
- Validate regex patterns before deployment
- Test patterns against sample inputs
- Generate Sentry.init() configuration code
- Understand pattern matching behavior
Pattern Types:
- ignoreErrors - String/regex patterns for error messages
- denyUrls - URL patterns to exclude from error reporting
- allowUrls - URL patterns to include (whitelist mode)
| SDK | Language | Real-time Validation | Compilation |
|---|---|---|---|
| JavaScript | javascript | ✅ ESLint | - |
| Python | python | ✅ ast.parse() | - |
| Ruby | ruby | ✅ ruby -c | - |
| PHP | php | ✅ php -l | - |
| Go | go | ✅ go build | ✅ |
| .NET | csharp | ✅ dotnet build | ✅ |
| Java | java | - | - |
| Android | kotlin | - | - |
| Cocoa | swift | - | - |
| React Native | javascript | ✅ ESLint | - |
| Rust | rust | ✅ cargo check | ✅ |
| Elixir | elixir | - | - |
The playground includes 50+ pre-built examples organized by mode:
- PII Scrubbing (JavaScript, Python, .NET, Ruby, Rust)
- Conditional Event Dropping (JavaScript, PHP, Go, Rust)
- Service Metadata Enrichment (Go, Rust)
- Custom Tags & Context (JavaScript, Java, Cocoa)
- Unity Metadata Cleanup (Android)
- Custom Fingerprinting (JavaScript)
- Normalize Database Errors (JavaScript)
- Normalize API URL Errors (JavaScript)
- Split by User Type (JavaScript)
- Drop Health Checks (JavaScript, Python, Go)
- Add Custom Tags (JavaScript)
- Filter Slow Spans (JavaScript)
- Scrub Sensitive URLs (JavaScript)
- Filter Console Breadcrumbs (JavaScript)
- Scrub PII from URLs (JavaScript, Python)
- Drop HTTP Noise (JavaScript)
- Categorize Breadcrumbs (JavaScript)
- Critical Endpoints Sampling (JavaScript)
- Health Check Filtering (JavaScript)
- User-Based Sampling (JavaScript)
- Environment-Based Sampling (Python)
See Examples Library for the complete catalog.
Share your configurations securely with colleagues or customers:
- Configure your event/code in any mode
- Click the Share button
- Copy the generated URL (expires after 30 days)
Security: Event values are automatically scrubbed before sharing. Only the structure (field names and types) is preserved, along with your code.
- Examples Library - Complete catalog of 50+ templates
- Choosing a Mode - Decision guide for mode selection
- SDK Support - Available SDKs and versions
- Before Send Guide - Error event transformation
- Fingerprinting Guide - Custom issue grouping
- Before Send Transaction Guide - Transaction filtering
- Before Breadcrumb Guide - Breadcrumb filtering
- Traces Sampler Guide - Dynamic sampling strategies
- Pattern Tester Guide - Filter pattern testing
- Config Analyzer Guide - Configuration analysis
- API Query Tester Guide - Query testing
- Webhooks Guide - Webhook testing
- Architecture Overview - System design and structure
- Architecture Deep Dive - Detailed technical docs with visual diagrams
- System Architecture Diagram - 3-tier Docker microservices layout
- Request Flow Diagram - Sequence diagrams for transform, config analysis, and query validation
- Health Score Algorithm - Flowchart of the scoring and recommendation engine
- API Reference - API endpoints and usage
- Development Guide - Contributing, testing, TDD workflow
- Troubleshooting - Common issues and solutions
- Docker & Docker Compose (required)
- That's it! Everything runs in Docker.
docker-compose downThis tool is maintained by Sentry's Solutions Engineering team for customer support and internal testing.
For questions or issues, reach out to the SE team or file an issue in the repository.
MIT