Feature Flag Tracking
Feature flags are a powerful way to roll out changes safely, but they can also introduce hidden performance regressions or failures if left unmonitored.
Laritor now supports feature flag tracking, allowing you to understand:
- How often a feature flag is evaluated
- How frequently it is active
- Whether it impacts performance or error rates
- Where it is being used across your application
This data is automatically aggregated and visualized in the Laritor dashboard.
Getting started
Section titled “Getting started”Update Laritor to the latest version
Section titled “Update Laritor to the latest version”First, make sure you are running the latest version of the Laritor ingest package.
composer update binarybuilds/laritor-clientAutomatic tracking with Laravel Pennant
Section titled “Automatic tracking with Laravel Pennant”If your application uses Laravel Pennant, Laritor will automatically track all feature flag evaluations without any additional configuration.
Laritor hooks into Pennant and records:
- Each feature flag check
- Whether the flag evaluated to active or inactive
- The context in which the flag was checked, such as requests, queued jobs, commands, or scheduled tasks
No code changes are required.
Tracking custom or non-Pennant feature flags
Section titled “Tracking custom or non-Pennant feature flags”If you are using a different feature flag provider or a home-grown feature flag system, you can manually report feature flag checks to Laritor using a single line of code.
Recording a feature flag check
Section titled “Recording a feature flag check”\BinaryBuilds\LaritorClient\Recorders\FeatureFlagRecorder::recordFeatureCheck( 'feature-flag-name', true);Example usage
Section titled “Example usage”if (feature_enabled('new-ui')) {
\BinaryBuilds\LaritorClient\Recorders\FeatureFlagRecorder::recordFeatureCheck( 'new-ui', true );
} else {
\BinaryBuilds\LaritorClient\Recorders\FeatureFlagRecorder::recordFeatureCheck( 'new-ui', false );}What Laritor tracks
Section titled “What Laritor tracks”- Total number of checks
- Number of active evaluations
- Activation rate
- Performance metrics such as average duration and latency percentiles
- Error counts when the flag is active vs inactive
Summary
Section titled “Summary”With feature flag tracking in Laritor, you gain real visibility into how feature flags affect your application in production. If you have feedback or ideas for improving feature flag insights, feel free to reach out via [email protected]. We are actively expanding this feature based on user input.