Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
As discussed in the issue, there is case for a Scraper supporting multiple timeseries from a single scrape function. This PR aims to add that functionality.
The approach taken is to add a map of
Metric
structs to theScraper
so that each individual timeseries has an alias on theScraper
. This then translates into Scraper Functions returning a map ofScraperResult
structs, with each key of the returned map matching the alias of theMetric
on theScraper
.This is a large refactor, and thus changes a lot of things: docs, tests, and each individual scraper. Because of that, the PR includes the following:
iam-quota
andiam-resource-usage
are consolidatedvpc-info
andsubnet-available-ips
are consolidatedCollector
has to update to know to iterated through theMetrics
property on aScraper
Metrics
Link To Issue
Closes issue #1
Types of changes
Because the API is not yet stable, I'm marking this as a new feature.
Checklist: