Skip to content

Commit 614bb13

Browse files
update
1 parent aec4f7e commit 614bb13

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

articles/azure-app-configuration/feature-management-dotnet-reference.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,11 +1360,11 @@ The `telemetry` section of a feature flag has the following properties:
13601360
| Property | Description |
13611361
| ---------------- | ---------------- |
13621362
| `enabled` | Specifies whether telemetry should be published for the feature flag. |
1363-
| `metadata` | A collection of key-value pairs, modeled as a dictionary, that can be used to attach custom metadata about the feature flag to evaluation events.
1363+
| `metadata` | A collection of key-value pairs, modeled as a dictionary, that can be used to attach custom metadata about the feature flag to evaluation events. |
13641364

13651365
### Custom Telemetry Publishing
13661366

1367-
The feature manager has its own `ActivitySource` with name "Microsoft.FeatureManagement". If `telemetry` is enabled for a feature flag, whenever the evaluation of this feature flag is started, the feature manager will start an `Activity`. When the feature flag evaluation is finished, the feature manager will add an `ActivityEvent` called "FeatureFlag" to the `Activity.Current`. The "FeatureFlag" event will have tags which include the information about the feature flag evaluation. Specifically, the tags will include the following fields:
1367+
The feature manager has its own `ActivitySource` named "Microsoft.FeatureManagement". If `telemetry` is enabled for a feature flag, whenever the evaluation of the feature flag is started, the feature manager will start an `Activity`. When the feature flag evaluation is finished, the feature manager will add an `ActivityEvent` named `"FeatureFlag"` to the current activity. The `"FeatureFlag"` event will have tags which include the information about the feature flag evaluation. Specifically, the tags will include the following fields:
13681368

13691369
| Tag | Description |
13701370
| ---------------- | ---------------- |
@@ -1416,6 +1416,9 @@ The `Microsoft.FeatureManagement.Telemetry.ApplicationInsights` package provides
14161416
builder.Services.AddSingleton<ITelemetryInitializer, TargetingTelemetryInitializer>();
14171417
```
14181418

1419+
> [!NOTE]
1420+
> To ensure that `TargetingTelemetryInitializer` works as expected, the `TargetingHttpContextMiddleware` described below should be used.
1421+
14191422
To enable persistance of targeting context in the current activity, you can use the [`TargetingHttpContextMiddleware`](https://github.com/microsoft/FeatureManagement-Dotnet/blob/preview/src/Microsoft.FeatureManagement.AspNetCore/TargetingHttpContextMiddleware.cs).
14201423

14211424
``` C#
@@ -1424,9 +1427,6 @@ app.UseMiddleware<TargetingHttpContextMiddleware>();
14241427

14251428
An example of its usage can be found in the [EvaluationDataToApplicationInsights](https://github.com/microsoft/FeatureManagement-Dotnet/tree/preview/examples/EvaluationDataToApplicationInsights) example.
14261429

1427-
> [!NOTE]
1428-
> To ensure that `TargetingTelemetryInitializer` works as expected, the `TargetingHttpContextMiddleware` described below should be used.
1429-
14301430
#### Prerequisite
14311431

14321432
This telemetry publisher depends on Application Insights already being [setup](/azure/azure-monitor/app/asp-net-core#enable-application-insights-server-side-telemetry-no-visual-studio) and registered as an application service. For example, that is done [here](https://github.com/microsoft/FeatureManagement-Dotnet/blob/preview/examples/EvaluationDataToApplicationInsights/Program.cs#L20C1-L20C54) in the example application.

0 commit comments

Comments
 (0)