Skip to content

Commit

Permalink
Validate QueueSettings config
Browse files Browse the repository at this point in the history
  • Loading branch information
FreakyNobleGas committed Feb 3, 2022
1 parent 1bf5ff4 commit 64c6f9e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions exporter/otlpexporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
package otlpexporter // import "go.opentelemetry.io/collector/exporter/otlpexporter"

import (
"fmt"

"go.opentelemetry.io/collector/config"
"go.opentelemetry.io/collector/config/configgrpc"
"go.opentelemetry.io/collector/exporter/exporterhelper"
Expand All @@ -34,5 +36,9 @@ var _ config.Exporter = (*Config)(nil)

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

return nil
}

0 comments on commit 64c6f9e

Please sign in to comment.