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)回调。

适用于