config.go 1.2 KB

1234567891011121314151617181920212223242526272829
  1. // Copyright The OpenTelemetry Authors
  2. // SPDX-License-Identifier: Apache-2.0
  3. package alertmanagerexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alertmanagerexporter"
  4. import (
  5. "go.opentelemetry.io/collector/component"
  6. "go.opentelemetry.io/collector/config/confighttp"
  7. "go.opentelemetry.io/collector/exporter/exporterhelper"
  8. )
  9. // Config defines configuration for alertmanager exporter.
  10. type Config struct {
  11. exporterhelper.TimeoutSettings `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. confighttp.HTTPClientSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct.
  15. GeneratorURL string `mapstructure:"generator_url"`
  16. DefaultSeverity string `mapstructure:"severity"`
  17. SeverityAttribute string `mapstructure:"severity_attribute"`
  18. }
  19. var _ component.Config = (*Config)(nil)
  20. // Validate checks if the exporter configuration is valid
  21. func (cfg *Config) Validate() error {
  22. return nil
  23. }