Creating and managing guardrail metrics
Overview
This topic explains how to create and manage guardrail metrics groups for use in guarded rollouts. LaunchDarkly includes guardrail metrics automatically during guarded rollout setup to help standardize measurement across teams.
Prerequisites
To create or edit guardrail metrics, you need:
- An Admin or Owner base role, or a custom role with guardrail metrics group permissions
- At least one custom metric in the project
- A consistent randomization unit, such as
useroraccount, across the metrics you plan to include
Create guardrail metrics
Each project can have one guardrail metrics group. The group may include one or more metrics that all share a common randomization unit, such as user or account. LaunchDarkly automatically includes this group in all guarded rollouts.
If no guardrail metrics group exists, the Metrics list displays a banner with an Add metrics button. Click the button to start creating the group.
Don't see the guardrail metrics banner?
If the banner doesn’t appear, a guardrail metrics group already exists. You can view or edit it from the Metric groups tab.
To create the guardrail metrics group:
-
Navigate to the Metrics list. A banner displays at the top of the page with an Add metrics button.

The "Guardrail metrics" banner. -
Click the “Select a metric” dropdown. LaunchDarkly displays the most used metrics in your project. You can choose to view:
- Currently selected
- Most used
- Recently added
- Autogenerated
- User-defined
- All metrics

All project metrics displayed after clicking "+ Add another metric" on the Guardrail metrics page. -
Browse the list or use the Search metrics field to find a metric.
-
Click a metric to add it to the guardrail metrics group. After you add the first metric, metrics that do not share a common randomization unit become unavailable for selection.

Add a metric. After adding the first metric, only metrics that share a common randomization unit can be added. -
(Optional.) Click + Add another metric to choose additional metrics that use the same randomization unit.
-
Click Create 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.
-
Navigate to the Metrics list.
-
Click the Metric groups tab.
-
Click Guardrail metrics to open the page. It includes two sections:
- Metrics: lists the metrics in the guardrail group.
- Connections: shows guarded rollouts that use the metrics. If no rollouts 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. -
Click Edit metrics.
-
Click + Add another metric to add or remove metrics as needed. You can add new metrics only if they have the same randomization unit as the first metric.

Add or remove metrics in the guardrail metrics group. Only metrics that share a common randomization unit can be added. -
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. You can also add guardrail metrics as secondary metrics in experiments.