Skip to content

Commit 9ce78eb

Browse files
committed
PR check
1 parent c37c9bd commit 9ce78eb

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

articles/azure-app-configuration/howto-feature-filters-aspnet-core.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ author: maud-lv
99
ms.author: malev
1010
ms.topic: how-to
1111
ms.date: 01/12/2024
12+
#Customerintent: As a developer, I want to create a feature filter to activate a feature flag depending on a specific scenario.
1213
---
1314

1415
# Use feature filters to enable conditional feature flags
@@ -25,6 +26,10 @@ The `Microsoft.FeatureManagement` library includes three feature filters:
2526

2627
You can also create your own feature filter that implements the Microsoft.FeatureManagement.IFeatureFilter interface.
2728

29+
## Prerequisites
30+
31+
- An App Configuration store. [Create a store](./quickstart-azure-app-configuration-create.md#create-an-app-configuration-store).
32+
2833
## Register a feature filter
2934

3035
You register a feature filter by calling the `AddFeatureFilter` method, specifying the type name of the desired feature filter. For example, the following code registers `PercentageFilter`:
@@ -49,7 +54,7 @@ You can configure these settings for feature flags defined in Azure App Configur
4954

5055
:::image type="content" source="./media/feature-filters/edit-beta-feature-flag.png" alt-text="Screenshot of the Azure portal, selecting the Edit option for the Beta feature flag, under Feature manager.":::
5156

52-
1. On the Beta feature flag you created in the quickstart, select the context menu and then select **Edit**.
57+
1. On the line with the Beta feature flag you created in the quickstart, select the context menu and then **Edit**.
5358

5459
1. In the **Edit feature flag** pane that opens, check the **Enable feature flag** checkbox if it isn't already enabled. Then check the **Use feature filter** checkbox and select **Create**.
5560

@@ -60,9 +65,9 @@ You can configure these settings for feature flags defined in Azure App Configur
6065
:::image type="content" source="./media/feature-filters/add-targeting-filter.png" alt-text="Screenshot of the Azure portal, creating a new targeting filter.":::
6166

6267
1. Optionally expand the **Evaluation flow** menu to see a graph showing how the targeting filter is evaluated in the selected scenario. Leave the **Default Percentage** at 50. The options **Override by Groups** and **Override by Users** let you enable or disable the feature flag for select groups or users. These options are disabled by default.
63-
1. Select **Add** to return to the **Edit feature flag** screen.
68+
1. Select **Add** to save the new feature filter and return to the **Edit feature flag** screen.
6469

65-
1. Select **Apply** again to save the new feature flag settings.
70+
1. The feature filter you created is now listed in the feature flag details. Select **Apply** to save the new feature flag settings.
6671

6772
:::image type="content" source="./media/feature-filters/feature-flag-edit-apply-filter.png" alt-text="Screenshot of the Azure portal, applying new targeting filter.":::
6873

@@ -74,8 +79,7 @@ You can configure these settings for feature flags defined in Azure App Configur
7479

7580
To see the effects of this feature flag, launch the application and hit the **Refresh** button in your browser multiple times. You'll see that the *Beta* item appears on the toolbar about 50% of the time. It's hidden the rest of the time, because the `PercentageFilter` deactivates the *Beta* feature for a subset of requests. The following video shows this behavior in action.
7681

77-
> [!div class="mx-imgBorder"]
78-
> ![TargetingFilter in action](./media/feature-flags-percentagefilter.gif)
82+
:::image type="content" source="./media/feature-filters/feature-flags-percentagefilter.gif" alt-text="Screenshot of a web browser showing a targeting filter in action.":::
7983

8084
## Next steps
8185

0 commit comments

Comments
 (0)