Skip to content

Commit

Permalink
[exporter/splunkhec] Add validation for sending_queue setting (open-t…
Browse files Browse the repository at this point in the history
…elemetry#8256)

* remove usage of Deprecated LogRecord.Name field.

* Add validation for `sending_queue` setting

Signed-off-by: jian.tan <[email protected]>

* add changelog

Signed-off-by: jian.tan <[email protected]>
  • Loading branch information
JaredTan95 authored and David Pequegnot committed Apr 8, 2022
1 parent 00ca8a0 commit a27ce9a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
- `skywalkingreceiver`: Add new skywalking receiver component folder and structure (#8107)
- `groupbyattrsprocesor`: Allow empty keys, which allows to use the processor for compaction (#7793)
- `datadogexporter`: Add rbac to example k8s manifest file (#8186)
- `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
}

0 comments on commit a27ce9a

Please sign in to comment.