Tags
Read time: 4 minutes
Last edited: Feb 15, 2024
Overview
This topic explains how to use tags with LaunchDarkly resources. Tags are customizable labels that help you categorize flags, segments, metrics, projects, environments, and other resources.
Tags are useful in the following ways:
- Categorizing: You can add the same tag to different kinds of resources. This lets you easily understand which resources are associated with which projects or teams.
- Filtering: You can filter the flags list, environments list, and projects list by tag.
- Permissions: You can allow or deny account members access to resources with specific tags. To learn how to use tags with custom role policies, read Using tags.
Tag names can include only letters, numbers, periods .
, underscores _
, and dashes -
. You can add tags to a resource when you create the resource, or you can add tags to existing resources later. The following sections explain how to add tags to existing resources.
Flags
To add tags to a flag:
- Navigate to the flags list.
- Click on the name of the flag you want to add tags to. The flag's Targeting tab appears.
- Click the Settings tab.
- In the "Settings for all environments" section, select a tag or create a new tag from the Tags menu.
- Click Save.
To learn how to add tags to flags when you create them, read Creating new flags.
You can also use the REST API: Update feature flag
Filtering the flags list by tag
You can filter the flags list by one or more tags.
To filter your flags:
- Click Filter.
- Choose "Tag(s)" from the Add filter menu.
- Choose one or more tags from the Search for a tag by name second menu:
- Click Add.
Your flags list now displays only the flags that match the filter you specified.
Segments
To add tags to a segment:
- Navigate to the Segments list.
- Click on the name of the segment you want to add tags to. The segment's Targeting tab appears.
- Click the Settings tab.
- In the "Settings" section, select a tag or create a new tag from the Tags menu.
- Click Save changes.
To learn how to add tags to segments when you create them, read Creating segments.
You can also use the REST API: Patch segment
Metrics
To add tags to a metric:
- Navigate to the Metrics list.
- Click on the name of the metric you want to add tags to. The metric details page appears.
- Click Edit metric.
- Select a tag or create a new tag from the Tags menu.
- Click Save metric.
To learn how to add tags to metrics when you create them, read Metrics.
You can also use the REST API: Patch metric
Projects
To add tags to a project:
- Navigate to the Account settings page.
- Click the Projects tab.
- Click on the name of the project you want to add tags to. The Environments tab appears.
- Click the Settings tab.
- In the "General information" section, select a tag or create a new tag from the Tags menu.
- Click Update information.
To learn how to add tags to projects when you create them, read Creating projects.
You can also use the REST API: Update project
Filtering the projects list by tag
You can filter the projects list by tag.
To filter your projects:
- Navigate to the Account settings page.
- Click the Projects tab.
- Select a tag to filter by from the Tags menu:
Your projects list now displays only the projects that match the tag you specified.
Environments
To add tags to an environment:
- Navigate to the Account settings page.
- Click the Projects tab.
- Click on the name of the project that contains the environment you want to add tags to. The Environments tab appears.
- Next to the environment you want to add tags to, click the overflow menu and choose "Edit environment." The Edit environment panel appears.
- Select a tag or create a new tag from the Tags menu.
- Click Save environment.
To learn how to add tags to environments when you create them, read Creating environments.
You can also use the REST API: Update environment
Filtering the environments list by tag
You can filter an environments list by tag.
To filter your environments:
- Navigate to the Account settings page.
- Click the Projects tab.
- Click on the name of the project that contains the environments you want to filter. The Environments tab appears.
- Select a tag to filter by from the Tags menu:
Your environments list now displays only the environments that match the tag you specified.