Skip to content

Commit 0cf33df

Browse files
committed
add text color, fix comments
1 parent 3759be0 commit 0cf33df

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/core/extensions/httpclient-latency-extensions.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ For more information, see [dotnet package add](../tools/dotnet-package-add.md) o
9090
### Register HTTP client latency telemetry
9191

9292
To add HTTP client latency telemetry to your application, call the <xref:Microsoft.Extensions.DependencyInjection.HttpClientLatencyTelemetryExtensions.AddHttpClientLatencyTelemetry*> extension method when configuring your services:
93-
93+
<pre>
9494
```csharp
9595
using Microsoft.Extensions.DependencyInjection;
9696

@@ -100,15 +100,16 @@ var builder = WebApplication.CreateBuilder(args);
100100
builder.Services.AddHttpClient();
101101

102102
// Add HTTP client latency telemetry
103-
builder.Services.AddHttpClientLatencyTelemetry();
103+
<span style="color: yellow">builder.Services.AddHttpClientLatencyTelemetry();</span>
104104
```
105+
</pre>
105106

106107
This registration adds a `DelegatingHandler` to all HTTP clients created through <xref:System.Net.Http.IHttpClientFactory>, collecting detailed latency information for each request.
107108

108109
### Configure telemetry options
109110

110-
You configure telemetry collection through the `HttpClientLatencyTelemetryOptions` (standard options pattern).
111-
You can supply values either with a delegate or by binding configuration (for example, appsettings.json).
111+
You configure telemetry collection through the <xref:Microsoft.Extensions.Http.Latency.HttpClientLatencyTelemetryOptions> ([standard options pattern](https://learn.microsoft.com/en-us/dotnet/core/extensions/options)).
112+
You can supply values either with a delegate or by binding configuration (for example, `appsettings.json`).
112113
The options instance is resolved once per handler pipeline so changes apply to new clients/handlers.
113114

114115
```csharp

0 commit comments

Comments
 (0)