/// <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)); }
public static Histogram CreateHistogram(string name, string help, HistogramConfiguration configuration) => DefaultFactory.CreateHistogram(name, help, configuration);
/// <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))); }