Documentation ¶
Overview ¶
+kubebuilder:validation:Optional
+kubebuilder:validation:Optional
Index ¶
- Variables
- func AddAlertsPipeline(config *OTelConfig, cfg CommonOTelConfig, extraProcessors ...string)
- func AddPrometheusRemoteWriteExporter(config *OTelConfig, promClient promapi.Client)
- func BuildApertureSelfScrapeConfig(name string, tlsConfig *tls.Config, lis *listener.Listener) map[string]any
- func BuildOTelScrapeConfig(name string, cfg CommonOTelConfig) map[string]any
- type BatchAlertsConfig
- type CommonOTelConfig
- type FxIn
- type OTelConfig
- func (o *OTelConfig) AddBatchProcessor(name string, timeout time.Duration, sendBatchSize uint32, ...)
- func (o *OTelConfig) AddDebugExtensions(userCfg *CommonOTelConfig)
- func (o *OTelConfig) AddExporter(name string, value interface{})
- func (o *OTelConfig) AddExtension(name string, value interface{})
- func (o *OTelConfig) AddProcessor(name string, value interface{})
- func (o *OTelConfig) AddReceiver(name string, value interface{})
- func (o *OTelConfig) AsMap() map[string]interface{}
- func (o *OTelConfig) SetDebugPort(userCfg *CommonOTelConfig)
- type OTelConfigUnmarshaller
- type OTelService
- type Pipeline
- type PortsConfig
Constants ¶
This section is empty.
Variables ¶
var BaseFxTag = config.NameTag("base")
BaseFxTag is the base name tag for otel components.
Functions ¶
func AddAlertsPipeline ¶
func AddAlertsPipeline(config *OTelConfig, cfg CommonOTelConfig, extraProcessors ...string)
AddAlertsPipeline adds reusable alerts pipeline.
func AddPrometheusRemoteWriteExporter ¶ added in v0.22.0
func AddPrometheusRemoteWriteExporter(config *OTelConfig, promClient promapi.Client)
AddPrometheusRemoteWriteExporter adds Prometheus remote write exporter which writes to controller Prometheus instance.
func BuildApertureSelfScrapeConfig ¶ added in v0.22.0
func BuildApertureSelfScrapeConfig( name string, tlsConfig *tls.Config, lis *listener.Listener, ) map[string]any
BuildApertureSelfScrapeConfig is a helper to create prometheus configuration which scrapes localhost.
func BuildOTelScrapeConfig ¶ added in v1.4.0
func BuildOTelScrapeConfig(name string, cfg CommonOTelConfig) map[string]any
BuildOTelScrapeConfig is a helper to create prometheus sonfiguration which scrapes OTel instance running on localhost.
Types ¶
type BatchAlertsConfig ¶
type BatchAlertsConfig struct { // Timeout sets the time after which a batch will be sent regardless of size. Timeout config.Duration `json:"timeout" validate:"gt=0" default:"1s"` // SendBatchSize is the size of a batch which after hit, will trigger it to be sent. SendBatchSize uint32 `json:"send_batch_size" validate:"gt=0" default:"100"` // SendBatchMaxSize is the upper limit of the batch size. Bigger batches will be split // into smaller units. SendBatchMaxSize uint32 `json:"send_batch_max_size" validate:"gte=0" default:"100"` }
BatchAlertsConfig defines configuration for OTel batch processor. swagger:model +kubebuilder:object:generate=true
func (*BatchAlertsConfig) DeepCopy ¶
func (in *BatchAlertsConfig) DeepCopy() *BatchAlertsConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BatchAlertsConfig.
func (*BatchAlertsConfig) DeepCopyInto ¶
func (in *BatchAlertsConfig) DeepCopyInto(out *BatchAlertsConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CommonOTelConfig ¶ added in v1.4.0
type CommonOTelConfig struct { // BatchAlerts configures batch alerts processor. BatchAlerts BatchAlertsConfig `json:"batch_alerts"` // Ports configures debug, health and extension ports values. Ports PortsConfig `json:"ports"` }
CommonOTelConfig is the configuration for the OTel collector. swagger:model +kubebuilder:object:generate=true
func NewDefaultCommonOTelConfig ¶ added in v1.4.0
func NewDefaultCommonOTelConfig() *CommonOTelConfig
NewDefaultCommonOTelConfig creates CommonOTelConfig with all the default values set.
func (*CommonOTelConfig) DeepCopy ¶ added in v1.4.0
func (in *CommonOTelConfig) DeepCopy() *CommonOTelConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonOTelConfig.
func (*CommonOTelConfig) DeepCopyInto ¶ added in v1.4.0
func (in *CommonOTelConfig) DeepCopyInto(out *CommonOTelConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FxIn ¶
type FxIn struct { fx.In Unmarshaller config.Unmarshaller Listener *listener.Listener PromClient promapi.Client TLSConfig *tls.Config ServerTLSConfig tlsconfig.ServerTLSConfig }
FxIn consumes parameters via Fx.
type OTelConfig ¶ added in v1.4.0
type OTelConfig struct { Extensions map[string]interface{} `json:"extensions,omitempty"` Receivers map[string]interface{} `json:"receivers,omitempty"` Processors map[string]interface{} `json:"processors,omitempty"` Exporters map[string]interface{} `json:"exporters,omitempty"` Service *OTelService `json:"service"` }
OTelConfig represents OTel Collector configuration.
func NewOTelConfig ¶ added in v1.4.0
func NewOTelConfig() *OTelConfig
NewOTelConfig creates new empty OTelConfig.
func (*OTelConfig) AddBatchProcessor ¶ added in v1.4.0
func (o *OTelConfig) AddBatchProcessor( name string, timeout time.Duration, sendBatchSize uint32, sendBatchMaxSize uint32, )
AddBatchProcessor is a helper function for adding batch processor.
func (*OTelConfig) AddDebugExtensions ¶ added in v1.4.0
func (o *OTelConfig) AddDebugExtensions(userCfg *CommonOTelConfig)
AddDebugExtensions adds common debug extensions and enables them.
func (*OTelConfig) AddExporter ¶ added in v1.4.0
func (o *OTelConfig) AddExporter(name string, value interface{})
AddExporter adds exporter to OTel config.
func (*OTelConfig) AddExtension ¶ added in v1.4.0
func (o *OTelConfig) AddExtension(name string, value interface{})
AddExtension adds given extension and enables it in service.
func (*OTelConfig) AddProcessor ¶ added in v1.4.0
func (o *OTelConfig) AddProcessor(name string, value interface{})
AddProcessor adds processor to OTel config.
func (*OTelConfig) AddReceiver ¶ added in v1.4.0
func (o *OTelConfig) AddReceiver(name string, value interface{})
AddReceiver adds receiver to OTel config.
func (*OTelConfig) AsMap ¶ added in v1.4.0
func (o *OTelConfig) AsMap() map[string]interface{}
AsMap returns map representation of OTelConfig.
func (*OTelConfig) SetDebugPort ¶ added in v1.4.0
func (o *OTelConfig) SetDebugPort(userCfg *CommonOTelConfig)
SetDebugPort configures debug port on which OTel server /metrics as specified by user.
type OTelConfigUnmarshaller ¶ added in v1.4.0
type OTelConfigUnmarshaller struct {
// contains filtered or unexported fields
}
OTelConfigUnmarshaller can be used as an OTel config map provider.
func NewOTelConfigUnmarshaler ¶ added in v1.4.0
func NewOTelConfigUnmarshaler(config map[string]interface{}) *OTelConfigUnmarshaller
NewOTelConfigUnmarshaler creates a new OTelConfigUnmarshaler instance.
func (*OTelConfigUnmarshaller) Retrieve ¶ added in v1.4.0
func (u *OTelConfigUnmarshaller) Retrieve(_ context.Context, _ string, _ confmap.WatcherFunc) (*confmap.Retrieved, error)
Retrieve returns the value to be injected in the configuration and the corresponding watcher.
func (*OTelConfigUnmarshaller) Scheme ¶ added in v1.4.0
func (u *OTelConfigUnmarshaller) Scheme() string
Scheme returns the scheme name, location scheme used by Retrieve.
type OTelService ¶ added in v1.4.0
type OTelService struct { Telemetry map[string]interface{} Pipelines map[string]Pipeline Extensions []string }
OTelService represents service in OTel Config.
func NewOTelService ¶ added in v1.4.0
func NewOTelService() *OTelService
NewOTelService returns new empty OTel Service.
func (*OTelService) AddPipeline ¶ added in v1.4.0
func (o *OTelService) AddPipeline(name string, pipeline Pipeline)
AddPipeline adds pipeline to OTel Service.
func (*OTelService) AsMap ¶ added in v1.4.0
func (o *OTelService) AsMap() map[string]interface{}
AsMap returns map representation of OTelService.
type PortsConfig ¶
type PortsConfig struct { // Port on which OTel collector exposes Prometheus metrics on /metrics path. DebugPort uint32 `json:"debug_port" validate:"gte=0" default:"8888"` // Port on which health check extension in exposed. HealthCheckPort uint32 `json:"health_check_port" validate:"gte=0" default:"13133"` // Port on which `pprof` extension in exposed. PprofPort uint32 `json:"pprof_port" validate:"gte=0" default:"1777"` // Port on which `zpages` extension in exposed. ZpagesPort uint32 `json:"zpages_port" validate:"gte=0" default:"55679"` }
PortsConfig defines configuration for OTel debug and extension ports. swagger:model +kubebuilder:object:generate=true
func (*PortsConfig) DeepCopy ¶
func (in *PortsConfig) DeepCopy() *PortsConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortsConfig.
func (*PortsConfig) DeepCopyInto ¶
func (in *PortsConfig) DeepCopyInto(out *PortsConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.