示例#1
0
        protected HttpClientDelegatingHandlerBase(HttpClientMetricsOptionsBase?options, TCollector?customMetric, HttpClientIdentity identity)
        {
            _identity = identity;

            MetricFactory = Metrics.WithCustomRegistry(options?.Registry ?? Metrics.DefaultRegistry);

            if (customMetric != null)
            {
                _metric = customMetric;

                ValidateNoUnexpectedLabelNames();
            }
            else
            {
                _metric = CreateMetricInstance(HttpClientRequestLabelNames.All);
            }
        }
示例#2
0
 public HttpClientInProgressHandler(HttpClientInProgressOptions?options, HttpClientIdentity identity)
     : base(options, options?.Gauge, identity)
 {
 }
示例#3
0
 public HttpClientResponseDurationHandler(HttpClientResponseDurationOptions?options, HttpClientIdentity identity)
     : base(options, options?.Histogram, identity)
 {
 }
示例#4
0
 public HttpClientRequestCountHandler(HttpClientRequestCountOptions?options, HttpClientIdentity identity)
     : base(options, options?.Counter, identity)
 {
 }