Exemplo n.º 1
0
        /// <summary>
        /// Summaries track the trends in events over time (10 minutes by default).
        /// </summary>
        public Summary CreateSummary(string name, string help, SummaryConfiguration configuration = null)
        {
            configuration = configuration ?? SummaryConfiguration.Default;

            var metric = new Summary(name, help, configuration.LabelNames, configuration.SuppressInitialValue, configuration.Objectives, configuration.MaxAge, configuration.AgeBuckets, configuration.BufferSize);

            return((Summary)_registry.GetOrAdd(metric));
        }
Exemplo n.º 2
0
 public static Summary CreateSummary(string name, string help, SummaryConfiguration configuration) =>
 DefaultFactory.CreateSummary(name, help, configuration);
Exemplo n.º 3
0
 /// <summary>
 /// Summaries track the trends in events over time (10 minutes by default).
 /// </summary>
 public Summary CreateSummary(string name, string help, SummaryConfiguration configuration = null)
 {
     return(_registry.GetOrAdd(new CollectorRegistry.CollectorInitializer <Summary, SummaryConfiguration>(
                                   (n, h, config) => new Summary(n, h, config.LabelNames, config.SuppressInitialValue, config.Objectives, config.MaxAge, config.AgeBuckets, config.BufferSize),
                                   name, help, configuration ?? SummaryConfiguration.Default)));
 }