failoverconnector

package module
v0.154.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2026 License: Apache-2.0 Imports: 16 Imported by: 3

README

Failover Connector

Status
Distributions contrib, k8s
Issues Open issues Closed issues
Code coverage codecov
Code Owners @akats7, @fatsheep9146

Supported Pipeline Types

Exporter Pipeline Type Receiver Pipeline Type Stability Level
traces traces alpha
metrics metrics alpha
logs logs alpha

Allows for health based routing between trace, metric, and log pipelines depending on the health of target downstream exporters.

Configuration

If you are not already familiar with connectors, you may find it helpful to first visit the Connectors README.

The following settings are available:

  • priority_levels (required): list of pipeline level priorities in a 1 - n configuration, multiple pipelines can sit at a single priority level.
  • retry_interval (optional): the frequency at which the pipeline levels will attempt to reestablish connection with all higher priority levels. Default value is 10 minutes. (See Example below for further explanation)
  • retry_gap (optional): * Deprecated * the amount of time between trying two separate priority levels in a single retry_interval timeframe. Default value is 30 seconds. (See Example below for further explanation)
  • max_retries (optional): Deprecated * the maximum retries per level. Default value is 10. Set to 0 to allow unlimited retries.

The connector intakes a list of priority_levels each of which can contain multiple pipelines. If any pipeline at a stable level fails, the level is considered unhealthy and the connector will move down one priority level and route all data to the new level (assuming it is stable).

The connector will periodically try to reestablish a stable connection with the higher priority levels. retry_interval will be the frequency at which the connector will try to iterate through all unhealthy higher priority levels.

Configuration Example:
connectors:
  failover:
    priority_levels:
      - [traces/first, traces/also_first]
      - [traces/second]
      - [traces/third]
    retry_interval: 10s

service:
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [failover]
    traces/first:
      receivers: [failover]
      exporters: [otlp_grpc/first]
    traces/second:
      receivers: [failover]
      exporters: [otlp_grpc/second]
    traces/third:
      receivers: [failover]
      exporters: [otlp_grpc/third]
    traces/also_first:
      receivers: [failover]
      exporters: [otlp_grpc/fourth]

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() connector.Factory

Types

type Config

type Config struct {
	// QueueSettings use the exporterhelper sending_queue to move the queue to the connector to avoid data being stuck
	// in the queue of an unhealthy exporter
	QueueSettings configoptional.Optional[exporterhelper.QueueBatchConfig] `mapstructure:"sending_queue"`

	// PipelinePriority is the list of pipeline level priorities in a 1 - n configuration, multiple pipelines can
	// sit at a single priority level and will be routed in a fanout. If any pipeline at a level fails, the
	// level is considered unhealthy
	PipelinePriority [][]pipeline.ID `mapstructure:"priority_levels"`

	// RetryInterval is the frequency at which the pipeline levels will attempt to recover by going over
	// all levels below the current
	RetryInterval time.Duration `mapstructure:"retry_interval"`

	// RetryGap is how much time will pass between trying two separate priority levels in a single RetryInterval
	// If the priority list has 3 levels, the RetryInterval is 5m, and the retryGap is 1m, within the 5m RetryInterval,
	// the connector will only try one level every 1m, and will return to the stable level in the interim
	RetryGap time.Duration `mapstructure:"retry_gap"` // **Deprecated**

	// MaxRetry is the maximum retries per level, once this limit is hit for a level, even if the next pipeline level fails,
	// it will not try to recover the level that exceeded the maximum retries
	MaxRetries int `mapstructure:"max_retries"` // **Deprecated**
	// contains filtered or unexported fields
}

func (*Config) Validate

func (c *Config) Validate() error

Validate needs to ensure RetryInterval > # elements in PriorityList * RetryGap

Directories

Path Synopsis
internal
metadata
Package metadata contains the autogenerated telemetry and build information for the connector/failover component.
Package metadata contains the autogenerated telemetry and build information for the connector/failover component.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL