-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
Description
Component(s)
receiver/mongodbatlas
Is your feature request related to a problem? Please describe.
Add a Project Config to metrics like the Alerts, Events and Logs configs
type ProjectConfig struct {
Name string `mapstructure:"name"`
ExcludeClusters []string `mapstructure:"exclude_clusters"`
IncludeClusters []string `mapstructure:"include_clusters"`
includesByClusterName map[string]struct{}
excludesByClusterName map[string]struct{}
}
Adding this feature will help improve performance by selecting specific projects and or clusters instead of collecting every one which may cause rate limiting by MongoDB Atlas.
Describe the solution you'd like
Add in a Project Config for metrics in the config.
Describe alternatives you've considered
The existing config has a MetricsBuilderConfig in the base, so to not creating breaking changes a the ProjectConfig would go directly in the base config for metrics which would like like:
type Config struct {
scraperhelper.ScraperControllerSettings `mapstructure:",squash"`
PublicKey string `mapstructure:"public_key"`
PrivateKey configopaque.String `mapstructure:"private_key"`
Granularity string `mapstructure:"granularity"`
MetricsBuilderConfig metadata.MetricsBuilderConfig `mapstructure:",squash"`
Projects []*ProjectConfig `mapstructure:"projects"`
Alerts AlertConfig `mapstructure:"alerts"`
Events *EventsConfig `mapstructure:"events"`
Logs LogConfig `mapstructure:"logs"`
RetrySettings exporterhelper.RetrySettings `mapstructure:"retry_on_failure"`
StorageID *component.ID `mapstructure:"storage"`
}
However, an alternative breaking change would create a new Metrics section which would include the ProjectConfig and possibly moving the MetricsBuilderConfig into the Metrics that would look like:
type Config struct {
scraperhelper.ScraperControllerSettings `mapstructure:",squash"`
PublicKey string `mapstructure:"public_key"`
PrivateKey configopaque.String `mapstructure:"private_key"`
Granularity string `mapstructure:"granularity"`
Metrics MetricConfig `mapstructure:"metrics"`
Alerts AlertConfig `mapstructure:"alerts"`
Events *EventsConfig `mapstructure:"events"`
Logs LogConfig `mapstructure:"logs"`
RetrySettings exporterhelper.RetrySettings `mapstructure:"retry_on_failure"`
StorageID *component.ID `mapstructure:"storage"`
}
Additional context
No response