Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[exporter/splunkhec] Add validation for sending_queue setting #8256

Merged
merged 9 commits into from
Mar 7, 2022
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- `routingprocessor`: Expand error handling on failure to build exporters (#8125)
- `skywalkingreceiver`: Add new skywalking receiver component folder and structure (#8107)
- `groupbyattrsprocesor`: Allow empty keys, which allows to use the processor for compaction (#7793)
- `splunkhecexporter`: Add validation for `sending_queue` setting (#8256)

### 🛑 Breaking changes 🛑

Expand Down
4 changes: 4 additions & 0 deletions exporter/splunkhecexporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ func (cfg *Config) getURL() (out *url.URL, err error) {
return
}

// Validate checks if the exporter configuration is valid.
func (cfg *Config) Validate() error {
if err := cfg.QueueSettings.Validate(); err != nil {
return fmt.Errorf("sending_queue settings has invalid configuration: %w", err)
}
return nil
}