No results for ""
EXPAND ALL
  • Home
  • API docs

GIVE DOCS FEEDBACK

Migration flag metrics

Read time: 3 minutes
Last edited: May 01, 2024

Overview

Three metrics are available for migration flags: consistency rate, p99 latency, and error rate. You can use these metrics to track the progress of a migration flag. LaunchDarkly reports metrics at the flag and cohort level to provide fine-grained insight into your migration. Flag level metrics can include metrics not reflected in current cohorts. For example, you may see metrics from recently deleted cohorts, evaluations from while the flag was turned off, or if the prerequisite check failed.

Your SDK automatically tracks these metrics for you unless you disable them. They are unrelated to experimentation metrics.

All metrics are updated hourly.

Three charts, each displaying a healthy metric.
Three charts, each displaying a healthy metric.

Consistency rate

The consistency rate metric shows how often two sets of compared data match each other. It is measured as a representative rate of total consistent invocations, where both invocations return the same results, against total number of invocations.

The consistency rate metric is not available for two-stage migrations, because it is only available when new and old systems can be run at the same time.

You must define what "same results" means for your systems. When you configure your SDK, you provide a validation function that compares the results of the old system and the new system and returns true if the systems are returning the same data. This validation function runs each time you read data while a cohort is in a stage that reads from both new and old systems, for example, the live stage.

In the LaunchDarkly user interface (UI), consistency rates lower than 99% display in red.

Changing the sampling ratio

If you'd like to run the consistency function less frequently, you can modify the consistency check interval in your flag settings for a specific environment. It defaults to 1, which means it will run for every invocation where there are old and new systems running simultaneously.

Latency

You can configure your SDK to return custom latency amounts, which are displayed in the UI as a p99 value. This number relies on the sampling ratio.

In the LaunchDarkly UI, unhealthy latency rates display in red. An unhealthy latency rate is ten percent or greater. Neutral rates of between zero and ten percent display in gray. Latency rates of less than ten percent are healthy, and display in green.

Error rate

The SDK you use reports errors as a rate per system. You can configure your SDK to log errors. This number relies on the sampling ratio.

In the LaunchDarkly UI, unhealthy error rates display in red. An unhealthy error rate is ten percent or greater. Neutral rates of between zero and ten percent display in gray. Latency rates of less than ten percent are healthy, and display in green.

Setting up metrics in the SDK

You can configure migration flag metrics in your SDK. To learn more, read Migration configuration.