Example #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);
            }
        }
Example #2
0
 public HttpClientInProgressHandler(HttpClientInProgressOptions?options, HttpClientIdentity identity)
     : base(options, options?.Gauge, identity)
 {
 }
Example #3
0
 public HttpClientResponseDurationHandler(HttpClientResponseDurationOptions?options, HttpClientIdentity identity)
     : base(options, options?.Histogram, identity)
 {
 }
Example #4
0
 public HttpClientRequestCountHandler(HttpClientRequestCountOptions?options, HttpClientIdentity identity)
     : base(options, options?.Counter, identity)
 {
 }