HttpDiagnosticsHttpRequestMessageExtensions.SetRequestMetadata Method

Definition

Sets metadata for outgoing requests to be used for telemetry purposes.

public static void SetRequestMetadata (this System.Net.Http.HttpRequestMessage request, Microsoft.Extensions.Http.Diagnostics.RequestMetadata metadata);

Parameters

metadata
RequestMetadata

Metadata for the request.

Applies to

Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)