Skip to content

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.


First, make sure you are running the latest version of the Laritor ingest package.

Terminal window
composer update binarybuilds/laritor-client

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.

\BinaryBuilds\LaritorClient\Recorders\FeatureFlagRecorder::recordFeatureCheck(
'feature-flag-name',
true
);

if (feature_enabled('new-ui')) {
\BinaryBuilds\LaritorClient\Recorders\FeatureFlagRecorder::recordFeatureCheck(
'new-ui',
true
);
} else {
\BinaryBuilds\LaritorClient\Recorders\FeatureFlagRecorder::recordFeatureCheck(
'new-ui',
false
);
}

  • 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

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.