• Home
  • Integrations
  • SDKs
  • Guides
  • API docs
No results for ""
EXPAND ALL

EDIT ON GITHUB

Viewing, monitoring, and subscribing to notifications

Read time: 3 minutes
Last edited: Jul 20, 2021

Overview

This topic explains how to view and filter flags and resources with the LaunchDarkly Slack app.

You must invite the LaunchDarkly Slack app to private Slack channels

If you want to subscribe to notifications in private channels, you must invite the LaunchDarkly bot (@LaunchDarkly) to the channel. If the LaunchDarkly Slack bot is not in a channel, it cannot send notifications to that channel.

You do not need to manually invite the LaunchDarkly bot user to public channels.

Filtering with the menu

You can filter to see a list of resources that match the criteria that you enter. This filter will subscribe to all matching events for flags, segments, metrics, environments, and projects.

To filter and subscribe:

  1. Type /launchdarkly subscribe in your Slack client's text bar and press Enter.
  2. The Filter Flags menu appears.
  3. Enter optional arguments to search for a specific flag. You can only search for one flag at a time.
  4. Use the dropdown menus to specify filtering criteria and hit Filter.
  5. Subscribe to any flags by selecting "Add flag to channel" from the dropdown.
  6. Subscribe to all the flags from this Filter by clicking the "Add filter to channel" button.

You can use the four types of optional filters in any combination to view different flags. If you click Filter without specifying any of the fields, you'll be subscribing to changes in all flags and resources.

The table below explains the different filtering criteria:

Filter CriteriaDescription
Project / EnvironmentOptional.
Filter by project, environment, or a combination of both.
Flag keyOptional.
Enter a flag key, which can begin or end with a wildcard *.
StatusOptional.
Filter by flag status. Available statuses are:
Any
Active
Inactive
Archived
Launched
New
ActionOptional.
Filter by action. Available actions are:
Any
Created
Updated
Deleted
Ready for removal
New
Flag tagOptional.
Filter by a list of all flag tags. Does not include other types of tags, such as segment tags.

Filtering for resources with in-line commands

You can also use in-line commands to filter for flags and resources in Slack.

Note: All in-line commands start with /launchdarkly and typing /launchdarkly or /ld will bring up a help menu listing the commands.

To filter with in-line commands:

  1. Type /launchdarkly subscribe but append filtering criteria.
  2. Specify the filtering criteria with either a single dash (-) and the first letter of the criteria, or a double dash (--) and the criteria name and an equal sign.
  3. Press Enter. The results of the filter display.
  4. Subscribe to any flags by selecting "Add flag to channel" from the dropdown.
  5. Subscribe to all the resources from this Filter by clicking the "Add filter to channel" button.

Examples of both types of entries:

  • -e or --environment=
  • -p or --project=
  • -t or --tag=
  • -s or --status=
  • -f or --flag_key=
  • -a or --action=

Note: /launchdarkly subscribe -p mobile -e test -s active would retrieve the same results as /launchdarkly subscribe --project=mobile --environment=test --status=active

Viewing feature flag information

You can view more detail about any flag with the Flag Overview page. The Flag Overview page is available from the list of filtered flags and any flag update notification by clicking "View Flag Details".

You can use the Flag Overview page to interact with the flag and access it on the LaunchDarkly website.

Here are some things you can do from the Flag Overview page:

  • Click the flag's name to be taken to the Flag Targeting screen of the LaunchDarkly website.
  • Toggle the flag on or off by clicking the Toggle Targeting button. If you change the flag's state to on or off, a flag update notification appears in the Slack channel.

For more information about flag update notifications, read Subscribing to Notifications.

The Flag Overview page.
The Flag Overview page.

The table below explains the flag detail fields:

Flag Detail nameDescription
Flag nameDisplays the flag name. In the example above, the flag name is displayed in blue, under the LaunchDarkly app title.
DescriptionDisplays the description of the flag as entered in LaunchDarkly.
ProjectDisplays the name of the project in which the flag exists.
EnvironmentDisplays the name of the environment in which the flag exists.
KeyDisplays the flag's key.
TagsDisplays any tags associated with the flag.
StatusDisplays the flag's status.
KindDisplays which kind of flag this is.
TargetingIndicates whether the flag targeting is on or off.
TemporaryDisplays whether or not the flag is temporary.
Remember your cases!

The data you specify for the in-line commands are case sensitive. If a filter you specify manually does not return any results, verify that you used the correct cases. For example, if you type my-project when the actual name of the project is My-Project, the filter does not return any results.

Filter results

When you filter resources, the results appear in your Slack channel or DM. You can use the filter results to perform different actions on the flag.

An example set of filtered flags.
An example set of filtered flags.

Flags and resources matching the filter criteria appear in this screen.

Here are some of the actions you can perform on a flag in this list:

  • Click the flag name to open the Flag Targeting screen in LaunchDarkly.
  • Click the dropdown menu to choose between View Flag Details and Add to channel. If you choose to add the flag to the channel, a notification appears in that channel every time the flag status changes.

At the bottom of the filter results, there are three buttons:

  • Next takes you to another page of filter results, if available.
  • Add filter to Channel adds the filter criteria to channel. This automatically adds resources that match filter criteria to the channel, and you'll get a notification every time the status of one of the matching flags, segments, metrics, environments, or projects changes.
  • Adjust Filter opens the Filter Flags screen where you can adjust the filtering criteria.

Listing flags in a channel

When a flag is subscribed to a channel, any updates automatically send notifications to that channel.

Use /launchdarkly flags to view and manage flags associated with the current channel.

The flags in a given channel.
The flags in a given channel.

Listing filters in a channel

When a filter is applied to the channel, any sets of flags, segments, metrics, environments, and projects that match the filter criteria automatically send notifications to that channel.

Use /launchdarkly filters to view and manage filters associated with the current channel.

For more information about associating filters with channels, see Filter Flag Results

The filters configured for the channel.
The filters configured for the channel.

This menu displays the values that define the filter, including Status, Project, Environment, and Tag. If you make changes to the filter, including removing it, the channel receives a notification about the changes.