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/feature-management-python-reference.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -361,7 +361,7 @@ The variant returned is dependent on the user currently being evaluated, and tha
361
361
362
362
### Variant Feature Flag Declaration
363
363
364
-
Compared to normal feature flags, variant feature flags have two additional properties: `variants`and`allocation`. The `variants`propertyis an array that contains the variants defined for this feature. The `allocation`property defines how these variants should be allocated for the feature. Just like declaring normal feature flags, you can set up variant feature flags in a json file. Hereis an example of a variant feature flag.
364
+
Compared to normal feature flags, variant feature flags have two additional properties: `variants`and`allocation`. The `variants`propertyis an array that contains the variants defined for this feature. The `allocation`property defines how these variants should be allocated for the feature. Just like declaring normal feature flags, you can set up variant feature flags in a json file. Here's an example of a variant feature flag.
365
365
366
366
```json
367
367
{
@@ -397,7 +397,7 @@ Compared to normal feature flags, variant feature flags have two additional prop
397
397
398
398
#### Defining Variants
399
399
400
-
Each variant has two properties: a name and a configuration. The name is used to refer to a specific variant, and the configuration is the value of that variant. The configuration can be set using `configuration_value`property. `configuration_value`is an inline configuration that can be a string, number, boolean, or configuration object. If `configuration_value`isnot specified, the returned variant's `Configuration` property will be null.
400
+
Each variant has two properties: a name and a configuration. The name is used to refer to a specific variant, and the configuration is the value of that variant. The configuration can be set using `configuration_value`property. `configuration_value`is an inline configuration that can be a string, number, boolean, or configuration object. If `configuration_value`isn't specified, the returned variant's `Configuration`property will be null.
401
401
402
402
A list of all possible variants is defined for each feature under the `variants`property.
403
403
@@ -483,7 +483,7 @@ The `allocation` setting of a feature has the following properties:
483
483
|`percentile`| Specifies a variant and a percentage range the user's calculated percentage has to fit into for that variant to be assigned. |
484
484
|`seed`| The value which percentage calculations for`percentile` are based on. The percentage calculation for a specific user will be the same across all features if the same `seed` value is used. If no `seed`is specified, then a default seed is created based on the feature name. |
485
485
486
-
In the above example, if the feature isnot enabled, the feature manager will assign the variant marked as`default_when_disabled` to the current user, which is`Small`in this case.
486
+
In the above example, if the feature isn't enabled, the feature manager will assign the variant marked as `default_when_disabled` to the current user, which is `Small` in this case.
487
487
488
488
If the feature is enabled, the feature manager will check the `user`, `group`, and`percentile` allocations in that order to assign a variant. For this particular example, if the user being evaluated is named `Marsha`, in the group named `Ring1`, or the user happens to fall between the 0and10th percentile, then the specified variant is assigned to the user. In this case, all of these would return the `Big` variant. If none of these allocations match, the user is assigned the `default_when_enabled` variant, which is`Small`.
489
489
@@ -538,11 +538,11 @@ These types of questions can be answered through the emission and analysis of fe
538
538
539
539
### Enabling Telemetry
540
540
541
-
By default, feature flags don't have telemetry emitted. To publish telemetry for a given feature flag, the flag _MUST_ declare that it is enabled for telemetry emission.
541
+
By default, feature flags don't have telemetry emitted. To publish telemetry for a given feature flag, the flag _MUST_ declare that it's enabled for telemetry emission.
542
542
543
543
For feature flags defined in json, this is done by using the `telemetry`property.
544
544
545
-
``` javascript
545
+
```json
546
546
{
547
547
"feature_management": {
548
548
"feature_flags": [
@@ -558,7 +558,7 @@ For feature flags defined in json, this is done by using the `telemetry` propert
558
558
}
559
559
```
560
560
561
-
The appsettings snippet above defines a feature flag named `MyFeatureFlag` that is enabled for telemetry. This is indicated by the `telemetry`object that sets `enabled` to true. The value of the `enabled`property must be `true` to publish telemetry for the flag.
561
+
The snippet above defines a feature flag named `MyFeatureFlag` that is enabled for telemetry. The `telemetry`object's `enabled` property is set to `true`. The value of the `enabled` property must be `true` to publish telemetry for the flag.
562
562
563
563
The `telemetry` section of a feature flag has the following properties:
564
564
@@ -573,11 +573,11 @@ In addition, when creating `FeatureManager`, a callback must be registered to ha
The feature management library provides a built-in telemetry publisher that sends feature flag evaluation data to [Application Insights](/azure/azure-monitor/app/app-insights-overview). To enable this, the feature management library can be installed with Azure Monitor, `pip install FeatureManagement[AzureMonitor]`. This will additionally install the `azure-monitor-events-extension` package, which is used to style telemetry to Application Insights using OpenTelemetry.
578
+
The feature management library provides a built-in telemetry publisher that sends feature flag evaluation data to [Application Insights](/azure/azure-monitor/app/app-insights-overview). To enable Application Insights, the feature management library can be installed with Azure Monitor, `pip install FeatureManagement[AzureMonitor]`. Pip will additionally install the `azure-monitor-events-extension` package, which is used to style telemetry to Application Insights using OpenTelemetry.
579
579
580
-
NOTE: This only adds the telemetry to the Open Telemetry pipeline. Registering Applicaiton Insights is still required.
580
+
NOTE: This extra only adds the telemetry to the Open Telemetry pipeline. Registering Application Insights is still required.
581
581
582
582
```python
583
583
from azure.monitor.opentelemetry import configure_azure_monitor
@@ -591,12 +591,12 @@ configure_azure_monitor(
591
591
592
592
Because the telemetry callback is a function, it can be customized to publish telemetry to any desired destination. For example, telemetry could be published to a logging service, a database, or a custom telemetry service.
593
593
594
-
When a feature flag is evaluated and telemetry is enabled, the feature manager will call the telemetry callback with an `EvaluationEvent` parameter. `EvaluationEvent` contains the following properties:
594
+
When a feature flag is evaluated and telemetry is enabled, the feature manager calls the telemetry callback with an `EvaluationEvent` parameter. `EvaluationEvent` contains the following properties:
595
595
596
596
| Tag | Description |
597
597
|----------------|----------------|
598
598
|`feature`| The feature flag used. |
599
-
|`user`| The user id used for targeting. |
599
+
|`user`| The user ID used for targeting. |
600
600
|`enabled`| Whether the feature flag is evaluated as enabled. |
601
601
|`Variant`| The assigned variant. |
602
602
|`VariantAssignmentReason`| The reason why the variant is assigned. |
0 commit comments