From e970cdd15ec31126c928023c6f02d768e005b49c Mon Sep 17 00:00:00 2001 From: Brandon H Date: Tue, 26 Mar 2019 12:45:03 -0700 Subject: [PATCH] Updating 'adding-a-new-scraper' docs for Validator creation --- adding-a-new-scraper.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/adding-a-new-scraper.md b/adding-a-new-scraper.md index daefe7617..0a395026a 100644 --- a/adding-a-new-scraper.md +++ b/adding-a-new-scraper.md @@ -20,9 +20,9 @@ Going forward in this guide, `TMetricDefinition` will refer to your newly create For every scraper type we provide validation for the configuration so that Promitor fails to start up. This requires the following steps: -1. Create a new validator that implements `IMetricValidator` -2. Hook your new validator in our validation pipeline in `MetricsValidator` -3. Provide a unit test for every validation rule that was added +1. Create a new validator that implements `MetricValidator` where `TMetricDefinition` is the definition you made in step #2 above. This validator should reside in `.\src\Promitor.Scraper.Host\Validation\MetricDefinitions\ResourceTypes`. You can look at the contents of `ServiceBusQueueMetricValidator` for an idea of the validation inputs, steps, and outputs typical of validator implementation. +2. Add construction and usage of this validator to `.\src\Promitor.Scraper.Host\Validation\Factories\MetricValidatorFactory.cs` for the ResourceType you created in step #1 above. +3. Provide a unit test for every validation rule that was added in `.\src\Promitor.Scraper.Tests.Unit\Validation\Metrics\ResourceTypes` ## Scraping 1. Implement a scraper that inherits from `Scraper`. This one will specify how to call Azure Monitor.