Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶
NewFactory creates a factory for a plugin receiver
Types ¶
type Config ¶
type Config struct { Path string `mapstructure:"path"` Parameters map[string]any `mapstructure:"parameters"` }
Config is the configuration of a plugin receiver
type Emitter ¶
Emitter is a struct used to emit data from an internal pipeline to an external consumer. The emitter operates as a singleton exporter within an internal pipeline.
func (*Emitter) Capabilities ¶
func (e *Emitter) Capabilities() consumer.Capabilities
Capabilities returns the capabilities of the emitter
type MetricsConfig ¶
type MetricsConfig struct {
Level string `yaml:"level,omitempty"`
}
MetricsConfig exposes the level of the telemetry metrics
type Parameter ¶
type Parameter struct { Name string `yaml:"name,omitempty"` Type ParameterType `yaml:"type,omitempty"` Default any `yaml:"default,omitempty"` Supported []any `yaml:"supported,omitempty"` Description *string `yaml:"description,omitempty"` Required bool `yaml:"required,omitempty"` }
Parameter is the parameter of plugin
type PipelineConfig ¶
type PipelineConfig struct { Receivers []string `yaml:"receivers,omitempty"` Processors []string `yaml:"processors,omitempty"` Exporters []string `yaml:"exporters,omitempty"` }
PipelineConfig is the config of a pipeline
type Plugin ¶
type Plugin struct { Title string `yaml:"title,omitempty"` Template string `yaml:"template,omitempty"` Version string `yaml:"version,omitempty"` Description string `yaml:"description,omitempty"` Parameters []Parameter `yaml:"parameters,omitempty"` }
Plugin is a templated pipeline of receivers and processors
func LoadPlugin ¶
LoadPlugin loads a plugin from a file path
func (*Plugin) ApplyDefaults ¶
ApplyDefaults returns a copy of the values map with parameter defaults applied. If a value is already present in the map, it supercedes the default.
func (*Plugin) CheckParameters ¶
CheckParameters checks the supplied values against the defined parameters of the plugin
type Receiver ¶
type Receiver struct {
// contains filtered or unexported fields
}
Receiver is a receiver that runs an embedded open telemetry config as an internal service.
func NewReceiver ¶
func NewReceiver( plugin *Plugin, renderedConfig *RenderedConfig, emitterFactory exporter.Factory, logger *zap.Logger, ) *Receiver
NewReceiver creates a new plugin receiver
type RenderedConfig ¶
type RenderedConfig struct { Receivers map[string]any `yaml:"receivers,omitempty"` Processors map[string]any `yaml:"processors,omitempty"` Exporters map[string]any `yaml:"exporters,omitempty"` Extensions map[string]any `yaml:"extensions,omitempty"` Service ServiceConfig `yaml:"service,omitempty"` }
RenderedConfig is the rendered config of a plugin
func NewRenderedConfig ¶
func NewRenderedConfig(yamlBytes []byte) (*RenderedConfig, error)
NewRenderedConfig creates a RenderedConfig with statically overwritten Exporters info
func (*RenderedConfig) GetConfigProviderSettings ¶
func (r *RenderedConfig) GetConfigProviderSettings() (*otelcol.ConfigProviderSettings, error)
GetConfigProviderSettings returns config provider settings for the rendered config
func (*RenderedConfig) GetRequiredFactories ¶
func (r *RenderedConfig) GetRequiredFactories(h component.Host, emitterFactory exporter.Factory) (*otelcol.Factories, error)
GetRequiredFactories finds and returns the factories required for the rendered config
type ServiceConfig ¶
type ServiceConfig struct { Extensions []string `yaml:"extensions,omitempty"` Pipelines map[string]PipelineConfig `yaml:"pipelines,omitempty"` Telemetry TelemetryConfig `yaml:"telemetry,omitempty"` }
ServiceConfig is the config of a collector service
type TelemetryConfig ¶
type TelemetryConfig struct {
Metrics MetricsConfig `yaml:"metrics,omitempty"`
}
TelemetryConfig is a representation of collector telemetry settings