|
| 1 | +--- |
| 2 | +title: Feature flag telemetry reference |
| 3 | +titleSuffix: Azure App Configuration |
| 4 | +description: Learn how App Configuration allows for telemetry viewing for feature flags. |
| 5 | +ms.service: azure-app-configuration |
| 6 | +author: mrm9084 |
| 7 | +ms.author: mametcal |
| 8 | +ms.topic: reference |
| 9 | +ms.date: 06/19/2025 |
| 10 | +--- |
| 11 | + |
| 12 | +# Feature flag telemetry reference |
| 13 | + |
| 14 | +Having telemetry data on your feature flags can be a powerful tool for understanding how your feature flags are used. Telemetry allows you to make informed decisions about your feature management strategy. |
| 15 | + |
| 16 | +In this document, you: |
| 17 | + |
| 18 | +> [!div class="checklist"] |
| 19 | +> - Learn what telemetry data is available using the Azure App Configuration provider libraries |
| 20 | +> - Learn what telemetry data is available using the Feature Management libraries |
| 21 | +
|
| 22 | +## Feature evaluation |
| 23 | + |
| 24 | +The Feature evaluation event is emitted whenever a feature flag that has telemetry enabled is evaluated in your application. This event, named `EvaluationEvent`, occurs each time your code checks a feature flag's status or gets a variant. The event captures the evaluation result, variant assignment details, and contextual information about why specific decisions were made. |
| 25 | + |
| 26 | +This event contains the following fields: |
| 27 | + |
| 28 | +### Basic fields |
| 29 | + |
| 30 | +The feature management libraries provide the following properties to telemetry data: |
| 31 | + |
| 32 | +- **FeatureName**: The name of the feature flag. |
| 33 | +- **Enabled**: A boolean value indicating if the feature flag is enabled. |
| 34 | +- **Variant**: The variant that was selected for the feature flag. |
| 35 | +- **VariantAssignmentReason**: The reason the variant was assigned to the user; DefaultWhenDisabled, DefaultWhenEnabled, User, Group, Percentile, None. |
| 36 | +- **TargetingId**: The ID of the user that was assigned to the variant. |
| 37 | +- **DefaultWhenEnabled**: The default variant of the feature flag when it's enabled. |
| 38 | +- **Version**: The version of this schema. |
| 39 | +- **VariantAssignmentPercentage**: Specifies the percentage of the user base the assigned variant is allocated for. This field is only present for percentile-based assignments. |
| 40 | + |
| 41 | +The full schema can be found in the [Feature Evaluation Event schema definition](https://github.com/microsoft/FeatureManagement/blob/main/Schema/FeatureEvaluationEvent/FeatureEvaluationEvent.v1.0.0.schema.json). |
| 42 | + |
| 43 | +This data can then be sent to locations to be viewed, such as Azure Monitor. When using our provided connections to Azure Monitor, a **custom_event** is published with the following properties whenever a telemetry enabled feature flag is evaluated. |
| 44 | + |
| 45 | +### App Configuration custom fields |
| 46 | + |
| 47 | +When the Azure App Configuration provider libraries are used, additional properties are added to the telemetry data. These properties provide more context about the feature flag and its evaluation: |
| 48 | + |
| 49 | +- **AllocationID**: A unique identifier representing the state of the feature flag's allocation. |
| 50 | +- **ETag**: The current ETag for the feature flag. |
| 51 | +- **FeatureFlagReference**: A reference to the feature flag in the format of `<your_store_endpoint>kv/<feature_flag_key>`. When a label is present, the reference includes it as a query parameter: `<your_store_endpoint>kv/<feature_flag_key>?label=<feature_flag_label>`. |
| 52 | + |
| 53 | +The full schema can be found in the [App Configuration Feature Evaluation Event schema definition](https://github.com/microsoft/FeatureManagement/blob/main/Schema/FeatureEvaluationEvent/AppConfigurationFeatureEvaluationEventv1.0.0.schema.json). |
| 54 | + |
| 55 | +## Next steps |
| 56 | + |
| 57 | +In this document, you learned about the telemetry data available for feature flags. To learn about how to use the telemetry data in your applications, continue to the following document for your language or platform. |
0 commit comments