Skip to content

Commit 6a23beb

Browse files
Fixes #5856 (#6147)
Update instructions how to fix a compatibility issue with App Insights
1 parent 354bf8d commit 6a23beb

File tree

1 file changed

+2
-2
lines changed
  • src/Libraries/Microsoft.Extensions.Http.Resilience

1 file changed

+2
-2
lines changed

src/Libraries/Microsoft.Extensions.Http.Resilience/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ There's a build time check that verifies if you're using `Grpc.Net.ClientFactory
105105

106106
### Compatibility with .NET Application Insights
107107

108-
If you're using .NET Application Insights, then enabling resilience functionality in your application could cause all Application Insights telemetry to be missing. The issue occurs when resilience functionality is registered before Application Insights services. Consider the following sample causing the issue:
108+
If you're using .NET Application Insights version **2.22.0** or lower, then enabling resilience functionality in your application could cause all Application Insights telemetry to be missing. The issue occurs when resilience functionality is registered before Application Insights services. Consider the following sample causing the issue:
109109

110110
```csharp
111111
// At first, we register resilience functionality.
@@ -115,7 +115,7 @@ services.AddHttpClient().AddStandardResilienceHandler();
115115
services.AddApplicationInsightsTelemetry();
116116
```
117117

118-
The issue is caused by the following [bug](https://github.com/microsoft/ApplicationInsights-dotnet/issues/2879) in Application Insights and can be fixed by registering Application Insights services before resilience functionality, as shown below:
118+
The issue can be fixed by updating .NET Application Insights to version **2.23.0** or higher. If you cannot update it, then registering Application Insights services before resilience functionality, as shown below, will fix the issue:
119119

120120
```csharp
121121
// We register Application Insights first, and now it will be working correctly.

0 commit comments

Comments
 (0)