示例#1
0
        public MetricsConfig(MetricsContext context)
        {
            this.context = context;

            if (!globalyDisabled)
            {
                this.healthStatus = () => HealthChecks.GetStatus();
                this.reports      = new MetricsReports(this.context.DataProvider, this.healthStatus);
                this.context.Advanced.ContextDisabled += (s, e) =>
                {
                    this.isDisabled |= true;
                    this.DisableAllReports();
                };
            }
        }
示例#2
0
 internal MetricsConfig()
 {
     this.registry     = new Lazy <MetricsRegistry>(() => new LocalRegistry(), true);
     this.healthStatus = () => HealthChecks.GetStatus();
     this.reports      = new Lazy <MetricsReports>(() => new MetricsReports(this.Registry, this.HealthStatus));
 }