You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-app-configuration/howto-feature-filters-aspnet-core.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,13 +13,13 @@ ms.author: lcozzens
13
13
---
14
14
# Use feature filters to enable a feature for a subset of users
15
15
16
-
Feature flags allow you to show or hide functionality in your application. A simple feature flag is either on or off. The application always behaves the same way. For example, you could roll out a new feature behind a feature flag. When the feature flag is enabled, all users see the new feature. Disabling the feature flag hides the new feature.
16
+
Feature flags allow you to activate or deactivate functionality in your application. A simple feature flag is either on or off. The application always behaves the same way. For example, you could roll out a new feature behind a feature flag. When the feature flag is enabled, all users see the new feature. Disabling the feature flag hides the new feature.
17
17
18
18
In contrast, a _conditional feature flag_ allows the feature flag to be enabled or disabled dynamically. The application may behave differently, depending on the feature flag criteria. Suppose you want to show your new feature to a small subset of users at first. A conditional feature flag allows you to enable the feature flag for some users while disabling it for others. _Feature filters_ determine the state of the feature flag each time it's evaluated.
19
19
20
20
The `Microsoft.FeatureManagement` library includes two feature filters:
21
21
22
-
-`PercentageFilter` enables the feature flag for a specified percentage of requests.
22
+
-`PercentageFilter` enables the feature flag based on a percentage.
23
23
-`TimeWindowFilter` enables the feature flag during a specified window of time.
24
24
25
25
You can also create your own feature filter that implements the [Microsoft.FeatureManagement.IFeatureFilter interface](/dotnet/api/microsoft.featuremanagement.ifeaturefilter).
@@ -38,9 +38,9 @@ public void ConfigureServices(IServiceCollection services)
38
38
39
39
## Configuring a feature filter in Azure App Configuration
40
40
41
-
Some feature filters have additional settings. For example, `PercentageFilter`has a setting specifying the percentage of requests for which the feature is enabled.
41
+
Some feature filters have additional settings. For example, `PercentageFilter`activates a feature based on a percentage. It has a setting defining the percentage to use.
42
42
43
-
You can configure these settings for feature flags defined in Azure App Configuration. For example, follow these steps to use `PercentageFilter` to enable the feature flag for 50% of requests:
43
+
You can configure these settings for feature flags defined in Azure App Configuration. For example, follow these steps to use `PercentageFilter` to enable the feature flag for 50% of requests to a web app:
44
44
45
45
1. Follow the instructions in [Quickstart: Add feature flags to an ASP.NET Core app](./quickstart-feature-flag-aspnet-core.md) to create a web app with a feature flag.
46
46
@@ -77,7 +77,7 @@ You can configure these settings for feature flags defined in Azure App Configur
77
77
78
78
## Feature filters in action
79
79
80
-
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`dynamically enables the *Beta* feature for a subset of requests. The following video shows this behavior in action.
80
+
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.
81
81
82
82
> [!div class="mx-imgBorder"]
83
83
> 
0 commit comments