Creating and managing guardrail metrics

This feature is for Early Access Program customers only

Guardrail metrics are only available to members of LaunchDarkly’s Early Access Program (EAP). If you want access to this feature, join the EAP.

Overview

This topic explains how to create and use guardrail metrics groups in guarded rollouts and experiments. LaunchDarkly includes guardrail metrics groups automatically during guarded rollout setup to help standardize measurement across teams.

Prerequisites

You need the following to complete the tasks in this topic:

Create guardrail metrics

Each project can have one guardrail metrics group. This group may contain one or more metrics and must use a consistent randomization unit, such as user or account. LaunchDarkly automatically includes guardrail metrics in all guarded rollouts, and you may use them in experiments as secondary metrics.

The Metrics list displays a banner with an Add metrics button if no guardrail metrics group exists. Click this button to start creating the group.

Don't see the guardrail metrics banner?

If the banner doesn’t appear, someone has already created the guardrail metrics group. You can view and edit it from the Metric groups tab.

To create the guardrail metrics group:

  1. Navigate to the Metrics list. A banner displays at the top of the page with an Add metrics button:

    The "Guardrail metrics" banner.

    The "Guardrail metrics" banner.
  2. Click + Add metrics. The guardrail metrics page appears.

  3. On the guardrail metrics page, click + Select a metric. LaunchDarkly displays all the metrics available in your project.

    All project metrics displayed after clicking "+ Select a metric" on the Guardrail metrics page.

    All project metrics displayed after clicking "+ Select a metric" on the Guardrail metrics page.
  4. Scroll through the list to browse available metrics, or type part of a metric name in the Search metrics field to filter the list.

  5. Click a metric to add it to your guardrail metrics group. After you add a metric, LaunchDarkly updates the list:

    • Metrics that use the same randomization unit appear at the top.
    • Metrics that use a different randomization unit appear in a section titled “Unavailable metrics.”

    After a metric is selected, compatible metrics appear at the top and unavailable metrics appear at the bottom.

    After a metric is selected, compatible metrics appear at the top and unavailable metrics appear at the bottom.
  6. To add more metrics, continue selecting from the list. You can only add metrics that use the same randomization unit as the first metric you selected.

  7. Click Save metric group.

LaunchDarkly creates the guardrail metrics group with the metrics you selected.

Edit guardrail metrics

You can view, add, or remove metrics in the guardrail group from the guardrail metrics page.

  1. Navigate to the Metrics list.

  2. Click the Metric groups tab.

  3. Click Guardrail metrics to open the guardrail metrics page. The page displays two sections:

    • “Metrics” shows the names and types of the metrics in the guardrail metrics group.
    • “Connections” shows recent guarded rollouts and experiments that have used the metrics. If no rollouts or experiments have used them yet, this section displays “This metric group is not connected to any guarded rollouts.”

    The "Guardrail metrics" page showing the guardrail metrics definition.

    The "Guardrail metrics" page showing the guardrail metrics definition.
  4. Click Edit metrics.

  5. Add or remove metrics as needed. You can only add metrics with the same randomization unit as the first metric in the list.

    Add or remove metrics in the guardrail metrics group. Only metrics with the same randomization unit can be added.

    Add or remove metrics in the guardrail metrics group. Only metrics with the same randomization unit can be added.
  6. Click Save metric group.

Use guardrail metrics in guarded rollouts and experiments

When you create a guarded rollout, LaunchDarkly checks whether a guardrail metrics group exists and whether its metrics use the same randomization unit as the rollout. If both conditions are met, LaunchDarkly includes the guardrail metrics automatically.

Guardrail metrics are not automatically added to experiments. You can manually add them as secondary metrics if they match the experiment’s randomization unit.