Setup
Enable feature flag tracking with the integration:The feature flags integration automatically tracks flag evaluations and includes them with error events and spans.
Recording Flag Evaluations
Manually record feature flag evaluations:Recording Multiple Flags
Integration with Feature Flag Services
LaunchDarkly
Split.io
GrowthBook
Sentry provides built-in GrowthBook integration:Feature Flag Context
Flags are automatically added to error and performance events:Flags on Spans
Flags are also attached to performance spans:Up to 10 unique flags per span are recorded. Additional flags are silently dropped.
Flag Buffer
Sentry maintains a buffer of the last 100 flag evaluations:Flag Buffer Behavior
- LRU (Least Recently Used): Old flags are removed when buffer is full
- Unique flags: Re-evaluating a flag updates its value
- Ordered: Flags are sorted by recency
Practical Examples
A/B Testing
Progressive Rollout
Feature Gating
Conditional Features
Analyzing Flag Impact
In Sentry, you can:- Filter issues by flags: See errors that occurred when a flag was enabled
- Compare performance: Measure performance impact of flags
- Correlate with releases: Track flag changes across releases
- Group by flags: Aggregate errors by flag combinations
Example Queries
Best Practices
- Record early: Track flags before using them
- Use descriptive names: Clear flag names help debugging
- Track all evaluations: Record flags even if they’re false
- Include experiments: Track A/B test variants as flags
- Clean up old flags: Remove tracking for deprecated flags
- Monitor flag impact: Watch error rates when enabling flags
Custom Integration
Create a wrapper for your feature flag service:TypeScript Support
Troubleshooting
Flags Not Appearing
Too Many Flags
Next Steps
Error Monitoring
See how flags impact errors
Performance
Measure flag performance impact
Context
Learn about context data
User Feedback
Collect feedback on new features