Exemplo n.º 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();
                };
            }
        }
Exemplo n.º 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));
 }