Using feature toggles in Azure Feature Manager gives the option to configure a label when creating a feature, in .NET to use that label the only option I could find is to set the label during startup when configuring Azure App Configuration which can be done like:
config.AddAzureAppConfiguration(
options =>
{
options.Connect(settings.GetConnectionString("Config"))
.UseFeatureFlags(o =>
{
o.Label = "Test";
o.CacheExpirationInterval = TimeSpan.FromSeconds(1);
});
},
The problem with that approach is during runtime we can't change the label, as it is pre-configured during startup.
The question is how can we manage different labels, let's say I have 100 labels and I want my application to evaluate feature toggle with respect to its label there is no way I could find to achieve that.
To evaluate feature toggle we call feature manager like so
await _featureManager.IsEnabledAsync(setting);