Documentation
¶
Index ¶
- Variables
- type Config
- type Instance
- func (i *Instance) ApplyConfig(logsSubsystem *logs.Logs, promInstanceManager instance.Manager, ...) error
- func (i *Instance) GetExporters() map[config.DataType]map[config.ComponentID]component.Exporter
- func (i *Instance) GetExtensions() map[config.ComponentID]component.Extension
- func (i *Instance) GetFactory(kind component.Kind, componentType config.Type) component.Factory
- func (i *Instance) ReportFatalError(err error)
- func (i *Instance) Stop()
- type InstanceConfig
- type OAuth2Config
- type ReceiverMap
- type RemoteWriteConfig
- type SpanMetricsConfig
- type TLSClientSetting
- type Traces
Constants ¶
This section is empty.
Variables ¶
var DefaultRemoteWriteConfig = RemoteWriteConfig{
Compression: compressionGzip,
Protocol: protocolGRPC,
Format: formatOtlp,
}
DefaultRemoteWriteConfig holds the default settings for a PushConfig.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Configs []InstanceConfig `yaml:"configs,omitempty"`
// Unmarshaled is true when the Config was unmarshaled from YAML.
Unmarshaled bool `yaml:"-"`
}
Config controls the configuration of Traces trace pipelines.
func (*Config) UnmarshalYAML ¶
func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements yaml.Unmarshaler.
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
Instance wraps the OpenTelemetry collector to enable tracing pipelines
func NewInstance ¶
func NewInstance(logsSubsystem *logs.Logs, reg prometheus.Registerer, cfg InstanceConfig, logger *zap.Logger, promInstanceManager instance.Manager) (*Instance, error)
NewInstance creates and starts an instance of tracing pipelines.
func (*Instance) ApplyConfig ¶
func (i *Instance) ApplyConfig(logsSubsystem *logs.Logs, promInstanceManager instance.Manager, reg prometheus.Registerer, cfg InstanceConfig) error
ApplyConfig updates the configuration of the Instance.
func (*Instance) GetExporters ¶
func (i *Instance) GetExporters() map[config.DataType]map[config.ComponentID]component.Exporter
GetExporters implements component.Host
func (*Instance) GetExtensions ¶
func (i *Instance) GetExtensions() map[config.ComponentID]component.Extension
GetExtensions implements component.Host
func (*Instance) GetFactory ¶
func (i *Instance) GetFactory(kind component.Kind, componentType config.Type) component.Factory
GetFactory implements component.Host
func (*Instance) ReportFatalError ¶
func (i *Instance) ReportFatalError(err error)
ReportFatalError implements component.Host
type InstanceConfig ¶
type InstanceConfig struct {
Name string `yaml:"name"`
// RemoteWrite defines one or multiple backends that can receive the pipeline's traffic.
RemoteWrite []RemoteWriteConfig `yaml:"remote_write,omitempty"`
// Receivers: https://github.com/open-telemetry/opentelemetry-collector/blob/7d7ae2eb34b5d387627875c498d7f43619f37ee3/receiver/README.md
Receivers ReceiverMap `yaml:"receivers,omitempty"`
// Batch: https://github.com/open-telemetry/opentelemetry-collector/blob/7d7ae2eb34b5d387627875c498d7f43619f37ee3/processor/batchprocessor/config.go#L24
Batch map[string]interface{} `yaml:"batch,omitempty"`
// Attributes: https://github.com/open-telemetry/opentelemetry-collector/blob/7d7ae2eb34b5d387627875c498d7f43619f37ee3/processor/attributesprocessor/config.go#L30
Attributes map[string]interface{} `yaml:"attributes,omitempty"`
// prom service discovery config
ScrapeConfigs []interface{} `yaml:"scrape_configs,omitempty"`
OperationType string `yaml:"prom_sd_operation_type,omitempty"`
PodAssociations []string `yaml:"prom_sd_pod_associations,omitempty"`
// SpanMetricsProcessor: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/spanmetricsprocessor/README.md
SpanMetrics *SpanMetricsConfig `yaml:"spanmetrics,omitempty"`
// AutomaticLogging
AutomaticLogging *automaticloggingprocessor.AutomaticLoggingConfig `yaml:"automatic_logging,omitempty"`
// TailSampling defines a sampling strategy for the pipeline
TailSampling *tailSamplingConfig `yaml:"tail_sampling,omitempty"`
// LoadBalancing is used to distribute spans of the same trace to the same agent instance
LoadBalancing *loadBalancingConfig `yaml:"load_balancing"`
// ServiceGraphs
ServiceGraphs *serviceGraphsConfig `yaml:"service_graphs,omitempty"`
}
InstanceConfig configures an individual Traces trace pipeline.
type OAuth2Config ¶ added in v0.22.9
type OAuth2Config struct {
ClientID string `yaml:"client_id"`
ClientSecret string `yaml:"client_secret"`
TokenURL string `yaml:"token_url"`
Scopes []string `yaml:"scopes,omitempty"`
TLS TLSClientSetting `yaml:"tls,omitempty"`
Timeout time.Duration `yaml:"timeout,omitempty"`
}
OAuth2Config configures the oauth2client extension for a remote_write exporter compatible with oauth2clientauthextension.Config
type ReceiverMap ¶ added in v0.20.1
type ReceiverMap map[string]interface{}
ReceiverMap stores a set of receivers. Because receivers may be configured with an unknown set of sensitive information, ReceiverMap will marshal as YAML to the text "<secret>".
func (ReceiverMap) MarshalYAML ¶ added in v0.20.1
func (r ReceiverMap) MarshalYAML() (interface{}, error)
MarshalYAML implements yaml.Marshaler.
func (*ReceiverMap) UnmarshalYAML ¶ added in v0.26.0
func (r *ReceiverMap) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements yaml.Unmarshaler.
type RemoteWriteConfig ¶
type RemoteWriteConfig struct {
Endpoint string `yaml:"endpoint,omitempty"`
Compression string `yaml:"compression,omitempty"`
Protocol string `yaml:"protocol,omitempty"`
Insecure bool `yaml:"insecure,omitempty"`
Format string `yaml:"format,omitempty"`
// Deprecated
InsecureSkipVerify bool `yaml:"insecure_skip_verify,omitempty"`
TLSConfig *prom_config.TLSConfig `yaml:"tls_config,omitempty"`
BasicAuth *prom_config.BasicAuth `yaml:"basic_auth,omitempty"`
Oauth2 *OAuth2Config `yaml:"oauth2,omitempty"`
Headers map[string]string `yaml:"headers,omitempty"`
SendingQueue map[string]interface{} `yaml:"sending_queue,omitempty"` // https://github.com/open-telemetry/opentelemetry-collector/blob/7d7ae2eb34b5d387627875c498d7f43619f37ee3/exporter/exporterhelper/queued_retry.go#L30
RetryOnFailure map[string]interface{} `yaml:"retry_on_failure,omitempty"` // https://github.com/open-telemetry/opentelemetry-collector/blob/7d7ae2eb34b5d387627875c498d7f43619f37ee3/exporter/exporterhelper/queued_retry.go#L54
}
RemoteWriteConfig controls the configuration of an exporter
func (*RemoteWriteConfig) UnmarshalYAML ¶
func (c *RemoteWriteConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements yaml.Unmarshaler.
type SpanMetricsConfig ¶
type SpanMetricsConfig struct {
LatencyHistogramBuckets []time.Duration `yaml:"latency_histogram_buckets,omitempty"`
Dimensions []spanmetricsprocessor.Dimension `yaml:"dimensions,omitempty"`
// Namespace if set, exports metrics under the provided value.
Namespace string `yaml:"namespace,omitempty"`
// ConstLabels are values that are applied for every exported metric.
ConstLabels *prometheus.Labels `yaml:"const_labels,omitempty"`
// MetricsInstance is the Agent's metrics instance that will be used to push metrics
MetricsInstance string `yaml:"metrics_instance"`
// HandlerEndpoint is the address where a prometheus exporter will be exposed
HandlerEndpoint string `yaml:"handler_endpoint"`
}
SpanMetricsConfig controls the configuration of spanmetricsprocessor and the related metrics exporter.
type TLSClientSetting ¶ added in v0.22.9
type TLSClientSetting struct {
CAFile string `yaml:"ca_file,omitempty"`
CertFile string `yaml:"cert_file,omitempty"`
KeyFile string `yaml:"key_file,omitempty"`
MinVersion string `yaml:"min_version,omitempty"`
MaxVersion string `yaml:"max_version,omitempty"`
Insecure bool `yaml:"insecure"`
InsecureSkipVerify bool `yaml:"insecure_skip_verify"`
ServerNameOverride string `yaml:"server_name_override,omitempty"`
}
TLSClientSetting configures the oauth2client extension TLS; compatible with configtls.TLSClientSetting
type Traces ¶
type Traces struct {
// contains filtered or unexported fields
}
Traces wraps the OpenTelemetry collector to enable tracing pipelines
func New ¶
func New(logsSubsystem *logs.Logs, promInstanceManager instance.Manager, reg prom_client.Registerer, cfg Config, level logrus.Level, fmt logging.Format) (*Traces, error)
New creates and starts trace collection.
func (*Traces) ApplyConfig ¶
func (t *Traces) ApplyConfig(logsSubsystem *logs.Logs, promInstanceManager instance.Manager, cfg Config, level logrus.Level) error
ApplyConfig updates Traces with a new Config.