Exemplo n.º 1
0
        private void ValidateSetup()
        {
            var scrapeConfigurationProvider = new MetricsDeclarationProvider();
            var validationSteps             = new List <IValidationStep>
            {
                new ConfigurationPathValidationStep(),
                new ScrapingScheduleValidationStep(),
                new MetricsDeclarationValidationStep(scrapeConfigurationProvider)
            };

            Validator.Run(validationSteps);
        }
Exemplo n.º 2
0
        public RuntimeValidator()
        {
            _validationLogger = new ConsoleLogger("Validation", (message, logLevel) => true, includeScopes: true);

            var scrapeConfigurationProvider = new MetricsDeclarationProvider();

            _validationSteps = new List <IValidationStep>
            {
                new ConfigurationPathValidationStep(_validationLogger),
                new ScrapingScheduleValidationStep(_validationLogger),
                new AzureAuthenticationValidationStep(_validationLogger),
                new MetricsDeclarationValidationStep(scrapeConfigurationProvider, _validationLogger)
            };
        }
Exemplo n.º 3
0
        public RuntimeValidator()
        {
            _validationLogger = new ValidationLogger();

            var scrapeConfigurationProvider = new MetricsDeclarationProvider(_validationLogger);

            _validationSteps = new List <IValidationStep>
            {
                new ConfigurationPathValidationStep(_validationLogger),
                new ScrapingScheduleValidationStep(_validationLogger),
                new AzureAuthenticationValidationStep(_validationLogger),
                new MetricsDeclarationValidationStep(scrapeConfigurationProvider, _validationLogger)
            };
        }
Exemplo n.º 4
0
        public RuntimeValidator(
            IOptions <MetricsConfiguration> metricsConfiguration,
            ValidationLogger validatorLogger,
            IConfiguration configuration,
            IMapper mapper)
        {
            _validationLogger = validatorLogger;

            var scrapeConfigurationProvider = new MetricsDeclarationProvider(configuration, _validationLogger, mapper);

            _validationSteps = new List <IValidationStep>
            {
                new ConfigurationPathValidationStep(metricsConfiguration, _validationLogger),
                new AzureAuthenticationValidationStep(configuration, _validationLogger),
                new MetricsDeclarationValidationStep(scrapeConfigurationProvider, _validationLogger)
            };
        }