config.go 951 B

123456789101112131415161718192021222324252627
  1. // Copyright The OpenTelemetry Authors
  2. // SPDX-License-Identifier: Apache-2.0
  3. package opencensusexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter"
  4. import (
  5. "go.opentelemetry.io/collector/component"
  6. "go.opentelemetry.io/collector/config/configgrpc"
  7. "go.opentelemetry.io/collector/exporter/exporterhelper"
  8. )
  9. // Config defines configuration for OpenCensus exporter.
  10. type Config struct {
  11. configgrpc.GRPCClientSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct.
  12. exporterhelper.QueueSettings `mapstructure:"sending_queue"`
  13. exporterhelper.RetrySettings `mapstructure:"retry_on_failure"`
  14. // The number of workers that send the gRPC requests.
  15. NumWorkers int `mapstructure:"num_workers"`
  16. }
  17. var _ component.Config = (*Config)(nil)
  18. // Validate checks if the exporter configuration is valid
  19. func (cfg *Config) Validate() error {
  20. return nil
  21. }