共用方式為


HttpMetricsEnrichmentContext.AddCallback 方法

定義

新增回呼以註冊計量的 http.client.request.duration 自定義標籤。

public:
 static void AddCallback(System::Net::Http::HttpRequestMessage ^ request, Action<System::Net::Http::Metrics::HttpMetricsEnrichmentContext ^> ^ callback);
public static void AddCallback (System.Net.Http.HttpRequestMessage request, Action<System.Net.Http.Metrics.HttpMetricsEnrichmentContext> callback);
static member AddCallback : System.Net.Http.HttpRequestMessage * Action<System.Net.Http.Metrics.HttpMetricsEnrichmentContext> -> unit
Public Shared Sub AddCallback (request As HttpRequestMessage, callback As Action(Of HttpMetricsEnrichmentContext))

參數

request
HttpRequestMessage

HttpRequestMessage 套用擴充的 。

callback
Action<HttpMetricsEnrichmentContext>

負責透過 AddCustomTag(String, Object)新增自定義標籤的回呼。

適用於