コード例 #1
0
        /// <summary>
        /// Histograms track the size and number of events in buckets.
        /// </summary>
        public Histogram CreateHistogram(string name, string help, HistogramConfiguration configuration = null)
        {
            configuration = configuration ?? HistogramConfiguration.Default;

            var metric = new Histogram(name, help, configuration.LabelNames, configuration.SuppressInitialValue, configuration.Buckets);

            return((Histogram)_registry.GetOrAdd(metric));
        }
コード例 #2
0
 public static Histogram CreateHistogram(string name, string help, HistogramConfiguration configuration) =>
 DefaultFactory.CreateHistogram(name, help, configuration);
コード例 #3
0
 /// <summary>
 /// Histograms track the size and number of events in buckets.
 /// </summary>
 public Histogram CreateHistogram(string name, string help, HistogramConfiguration configuration = null)
 {
     return(_registry.GetOrAdd(new CollectorRegistry.CollectorInitializer <Histogram, HistogramConfiguration>(
                                   (n, h, config) => new Histogram(n, h, config.LabelNames, config.SuppressInitialValue, config.Buckets),
                                   name, help, configuration ?? HistogramConfiguration.Default)));
 }