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
JSON Content Type Handling | [GA](./reference-dotnet-provider.md#json-content-type-handling) | GA | GA | [GA](./reference-python-provider.md#json-content-type-handling) | [GA](./reference-javascript-provider.md#json-content-type-handling) | [GA](./reference-go-provider.md#json-content-type-handling)
57
-
JSON with Comments | [GA](./reference-dotnet-provider.md#json-content-type-handling) | GA | GA | GA | [GA](./reference-javascript-provider.md#json-content-type-handling) | [GA](./reference-go-provider.md#json-content-type-handling)
JSON with Comments | [GA](./reference-dotnet-provider.md#json-content-type-handling) | GA | GA | [GA](./reference-python-provider.md#json-content-type-handling) | [GA](./reference-javascript-provider.md#json-content-type-handling) | [GA](./reference-go-provider.md#json-content-type-handling)
Feature Flags | [GA](./reference-dotnet-provider.md#feature-flag) | GA | GA | [GA](./reference-python-provider.md#feature-flag-refresh) | [GA](./reference-javascript-provider.md#feature-flag) | [GA](./reference-go-provider.md#feature-flags)
64
64
Variant Feature Flags | [GA](./reference-dotnet-provider.md#feature-flag) | GA | GA | GA | [GA](./reference-javascript-provider.md#feature-flag) | [GA](./reference-go-provider.md#feature-flags)
65
-
Feature Flag Telemetry | [GA](./reference-dotnet-provider.md#feature-flag-telemetry) | GA | GA | GA | GA | WIP
65
+
Feature Flag Telemetry | [GA](./reference-dotnet-provider.md#feature-flag-telemetry) | GA | GA | [GA](./reference-python-provider.md#feature-flag-telemetry) | GA | WIP
66
66
Key Prefix Trim | [GA](./reference-dotnet-provider.md#trim-prefix-from-keys) | GA | GA | [GA](./reference-python-provider.md#trimming-keys) | [GA](./reference-javascript-provider.md#trim-prefix-from-keys) | [GA](./reference-go-provider.md#trim-prefix-from-keys)
Replica Auto Discovery | [GA](./reference-dotnet-provider.md#geo-replication) | GA | GA | [GA](./reference-python-provider.md#geo-replication) | [GA](./reference-javascript-provider.md#geo-replication) | [GA](./reference-go-provider.md#geo-replication)
69
69
Replica Failover | [GA](./reference-dotnet-provider.md#geo-replication) | GA | GA | [GA](./reference-python-provider.md#geo-replication) | [GA](./reference-javascript-provider.md#geo-replication) | [GA](./reference-go-provider.md#geo-replication)
70
-
Replica Load Balancing | [GA](./reference-dotnet-provider.md#geo-replication) | GA | GA | GA | [GA](./reference-javascript-provider.md#geo-replication) | [GA](./reference-go-provider.md#geo-replication)
70
+
Replica Load Balancing | [GA](./reference-dotnet-provider.md#geo-replication) | GA | GA | [GA](./reference-python-provider.md#geo-replication) | [GA](./reference-javascript-provider.md#geo-replication) | [GA](./reference-go-provider.md#geo-replication)
71
71
Snapshots | [GA](./reference-dotnet-provider.md#snapshot) | GA | GA | [GA](./reference-python-provider.md#load-configuration-from-snapshots) | [GA](./reference-javascript-provider.md#snapshot) | [GA](./reference-go-provider.md#snapshot)
Health Check | [GA](./reference-dotnet-provider.md#health-check) | GA | WIP | WIP | WIP | N/A
74
-
Select by Tag Filters | [GA](./reference-dotnet-provider.md#load-specific-key-values-using-selectors) | WIP | GA | GA | [GA](./reference-javascript-provider.md#tag-filters) | [GA](./reference-go-provider.md#tag-filters)
74
+
Select by Tag Filters | [GA](./reference-dotnet-provider.md#load-specific-key-values-using-selectors) | WIP | GA | [GA](./reference-python-provider.md#tag-filters) | [GA](./reference-javascript-provider.md#tag-filters) | [GA](./reference-go-provider.md#tag-filters)
> Starting with version *2.2.0* of `azure-appconfiguration-provider`, the configuration provider allows comments, as defined in ([JSONC](https://jsonc.org/)), in key-values with an `application/json` content type.
99
+
100
+
97
101
### Load specific key-values using selectors
98
102
99
103
By default, the `load` method loads all configurations with no label from the configuration store. You can configure the behavior of the `load` method through the optional parameter of `selects`, which is a list of `SettingSelector`s.
> Key-values are loaded in the order in which the selectors are listed. If multiple selectors retrieve key-values with the same key, the value from the last one overrides any previously loaded value.
115
119
120
+
#### Tag filters
121
+
122
+
The tag filters parameter selects key-values with specific tags. A key-value is only loaded if it has all of the tags and corresponding values specified in the filters.
123
+
124
+
```python
125
+
from azure.appconfiguration.provider import load, SettingSelector
> The characters asterisk (`*`), comma (`,`), and backslash (`\`) are reserved and must be escaped with a backslash when used in a tag filter.
134
+
116
135
### Load configuration from snapshots
117
136
118
137
You can load configuration settings from [snapshots](./concept-snapshots.md) by using the `snapshot_name` parameter in `SettingSelector`. When you specify a snapshot name, all configuration settings from that snapshot are loaded. The `snapshot_name` parameter can't be used with `key_filter`, `label_filter`, or `tag_filters`.
print(config["message"]) # Access the key "message" instead of "/application/message"
143
162
```
144
163
164
+
### Configuration setting mapping
165
+
166
+
The `configuration_mapper` parameter allows you to transform configuration settings before they're processed and added to the provider. The mapper function receives each `ConfigurationSetting` object and can modify it in-place.
The provider can be configured to pull the latest settings from the App Configuration store without having to restart the application. You can use the `refresh_on` parameter to enable this behavior. The `refresh_on` parameter is a `List[WatchKey]`, which specifies the one or more key/labels to watch for changes. The loaded configuration is updated when any change of selected key-values is detected on the server. By default, a refresh interval of 30 seconds is used, but you can override it with the `refresh_interval` parameter.
@@ -225,6 +281,16 @@ print(f"Beta is: {feature_manager.is_enabled("Beta")}")
225
281
226
282
For more information about how to use the Python feature management library, go to the [feature flag quickstart](./quickstart-feature-flag-python.md).
227
283
284
+
### Feature flag telemetry
285
+
286
+
When feature flag telemetry is enabled, the Azure App Configuration provider injects additional properties to feature flag telemetry data. These properties provide more context about the feature flag and its evaluation:
287
+
288
+
-**AllocationID**: A unique identifier representing the state of the feature flag's allocation.
289
+
-**ETag**: The current ETag for the feature flag.
290
+
-**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>`.
291
+
292
+
The full schema can be found in the [App Configuration Feature Evaluation Event schema definition](https://github.com/microsoft/FeatureManagement/blob/main/Schema/FeatureEvaluationEvent/AppConfigurationFeatureEvaluationEvent.v1.0.0.schema.json). For more information about how to use the feature flag telemetry, go to the [enable telemetry for feature flags](./howto-telemetry.md) walkthrough.
293
+
228
294
### Feature flag refresh
229
295
230
296
To enable refresh for feature flags, you need to set `feature_flag_refresh_enabled=True`. This parameter allows the provider to refresh feature flags the same way it refreshes configurations. Unlike configurations, all loaded feature flags are monitored for changes and cause a refresh. Refresh of configuration settings and feature flags are independent of each other. Both configuration settings and feature flags are updated by the `refresh` method, but a feature flag changing doesn't cause a refresh of configurations and vice versa. Also, if refresh for configuration settings isn't enabled, feature flags can still be enabled for refresh.
Azure App Configuration enables you to configure secret refresh intervals independently of your configuration refresh cycle. This is crucial for security because while the Key Vault reference URI in App Configuration remains unchanged, the underlying secret in Key Vault might be rotated as part of your security practices.
366
+
367
+
To ensure your application always uses the most current secret values, configure the `secret_refresh_interval` key word in `load`. This forces the provider to retrieve fresh secret values from Key Vault when:
368
+
369
+
- Your application calls `refresh`
370
+
- The configured refresh interval for the secret has elapsed
371
+
372
+
This mechanism works even when no changes are detected in your App Configuration store, ensuring your application stays in sync with rotated secrets.
373
+
374
+
```python
375
+
from azure.appconfiguration.provider import load
376
+
from azure.identity import DefaultAzureCredential
377
+
378
+
config = load(
379
+
endpoint=endpoint,
380
+
credential=DefaultAzureCredential(),
381
+
keyvault_credential=DefaultAzureCredential(),
382
+
secret_refresh_interval=7200# 2 hours
383
+
)
384
+
```
385
+
296
386
## Geo-replication
297
387
298
388
The Azure App Configuration Provider library automatically discovers the provided configuration store's replicas and uses the replicas if any issue arises. For more information, see [geo-replication](./howto-geo-replication.md).
0 commit comments