Creating and managing metric groups

Overview

This topic explains how to create and manage metric groups, which are reusable lists of metrics you can use to standardize metrics across multiple flags or experiments.

Prerequisites

Before you create a metric group, you must create each metric that you want to include in the group. To learn how, read Metrics. The group may include one or more metrics that all share a common randomization unit, such as user or account.

Funnel metric groups cannot include custom numeric metrics

Funnel metric groups can include only custom conversion binary, custom conversion count, clicked or tapped, and page viewed metrics.

Create metric groups

To create a metric group:

  1. Navigate to the Metrics list.

  2. Click the dropdown icon in the Create metric button and select Create metric group. The “Create metric group” dialog appears.

  3. Enter a unique, human-readable name for the group.

  4. (Optional) Enter a human-readable Description of the metric group.

  5. Click either Standard or Funnel to select the type of metric group to create.

  6. Click the first “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

    Most used project metrics displayed after clicking "Select a metric" on the Create metric group page.

    Most used project metrics displayed after clicking "Select a metric" on the Create metric group page.
  7. Browse the list or use the Search metrics field to find a metric.

  8. Click a metric to add it to the metrics group.

  9. Click the second “Select a metric” dropdown to choose a second metric for the group. Metrics that do not have a randomization unit that overlaps with other metrics in the group become unavailable for later selections.

    Only metrics with an overlapping randomization unit can be added.

    Only metrics with an overlapping randomization unit can be added.
  10. (Optional) Click + Add another metric and repeat the previous step to add more metrics to your group.

  11. (Optional) For funnel metric groups, drag and drop the steps up or down to reorder them as needed.

  12. Click Create metric group.

The new metric group appears on the Metric groups list.

You can also use the REST API: Create metric group

Edit metric groups

Select a group from the Metric groups list to edit its name, description, maintainer, metrics, or, for funnel metric groups, step order.

Click the metric group’s name or description to update it. Click the pencil icon next to the metric group’s maintainer to assign a new maintainer.

To edit a metric group’s metrics or step order:

  1. Navigate to the Metrics list.
  2. Click the Metric groups tab.
  3. Click the name of the metric group you want to edit. The metric group details page opens.
  4. Click Edit metrics.
  5. (Optional) Click + Add another metric to add additional metrics to the group.
  6. (Optional) Click the x icon next to an individual metric to remove it. You must have at least two metrics in the metric group.
  7. (Optional) For funnel metric groups, click and hold the grab handle (dotted lines) to drag and drop the existing steps into your desired order.
  8. Click Save metric group.

You can also use the REST API: Patch metric group

Delete metric groups

To delete a metric group, navigate to the metric group’s details page and click Delete metric group. Deleting a metric group removes it from all of the environments within the project.

You cannot delete a metric group if it is connected to an experiment or a flag.

You can also use the REST API: Delete a metric group