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: docs/core/resilience/http-resilience.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,8 +90,8 @@ The preceding code:
90
90
- Creates a <xref:Microsoft.Extensions.DependencyInjection.ServiceCollection> instance.
91
91
- Adds the standard resilience handler to all <xref:System.Net.Http.HttpClient> instances.
92
92
- For the "custom" <xref:System.Net.Http.HttpClient>:
93
-
- Removes all predefined resilience handlers that were previously registered. This is useful when you want to start with a clean state to add your own custom strategies.
94
-
- Adds a `StandardHedgingHandler` to the <xref:System.Net.Http.HttpClient>. You can replace `AddStandardHedgingHandler()` with any strategy that suits your application's needs, such as retry mechanisms, circuit breakers, or other resilience techniques.
93
+
- Removes all predefined resilience handlers that were previously registered. This is useful when you want to start with a clean state to add your own custom strategies.
94
+
- Adds a `StandardHedgingHandler` to the <xref:System.Net.Http.HttpClient>. You can replace `AddStandardHedgingHandler()` with any strategy that suits your application's needs, such as retry mechanisms, circuit breakers, or other resilience techniques.
95
95
96
96
### Standard resilience handler defaults
97
97
@@ -293,7 +293,7 @@ There's a build time check that verifies if you're using `Grpc.Net.ClientFactory
293
293
294
294
### Compatibility with .NET Application Insights
295
295
296
-
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:
296
+
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:
297
297
298
298
```csharp
299
299
// At first, we register resilience functionality.
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:
306
+
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:
307
307
308
308
```csharp
309
309
// We register Application Insights first, and now it will be working correctly.
0 commit comments