Skip to content

Implement Scraper Groups in vCenter Receiver #44061

@blewis12

Description

@blewis12

Component(s)

receiver/vcenter

Describe the issue you're reporting

This is a follow up to this previous issue. The solution that was merged in the addressing PR introduced a function called hasEnabledVSANMetrics() which can be checked against to determine whether to run vSAN related code.

However, the function itself checks against every vSAN metric manually. The PR also introduces a test which will fail if a vSAN metric is added or removed from the metadata.yaml file, and point the developer to add/remove that metric from both the test and the hasEnabledVSANMetrics() function to ensure everything is aligned.

It was suggested in this comment that we could approach this in an alternate way: to adopt what's done in the hostmetrics receiver, and have metrics are grouped into "scrapers" that can be enabled/disabled as entire unit as well as individually. This would simplify the hasEnabledVSANMetrics() function because we could simply check if that scraper group is enabled or not - and in general seems beneficial in terms of managing metric collection.

This would be a breaking change, but seems cleaner than the current implementation

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions