chqconfigextension

package module
v0.0.0-...-b051619 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2025 License: Apache-2.0 Imports: 15 Imported by: 5

README

chqconfigextension

This extension is the building block for the Cardinal collector dynamic update system. This extension will contact a service and poll for configuration of various types of other components used inside a Cardinal Open Telemetry Collector.

Configuration

extensions:
  chqconfig:
    source:
      auth:
        authenticator: "chqauth"
      endpoint: "https://api.global.aws.cardinalhq.io/api/v2/samplerConfig"

While any authentication type can be used, the example uses the Cardinal control pane's auth requirements and endpoint.

The endpoint can be a http:// https:// or file:// URI method. All types will be polled for configuration, so using a local file is possible as well as data from a service API endpoint.

How it works

Periodically, the extension polls the endpoint for a configuration change. When a change is detected, it is distributed to any users of this extension. Many Cardinal processors use this to obtain their runtime configuration.

The Open Telemetry Collector pipelines are not modified by this extension. It is only used to inject dynamic rules, rate limiting, and other features into an existing pipeline.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() extension.Factory

NewFactory creates a factory for the static bearer token Authenticator extension.

Types

type CHQConfigExtension

type CHQConfigExtension struct {
	// contains filtered or unexported fields
}

func (*CHQConfigExtension) RegisterCallback

func (chq *CHQConfigExtension) RegisterCallback(name string, cb ottl.ConfigUpdateCallbackFunc) int

func (*CHQConfigExtension) Shutdown

func (chq *CHQConfigExtension) Shutdown(context.Context) error

func (*CHQConfigExtension) Start

func (chq *CHQConfigExtension) Start(_ context.Context, host component.Host) error

func (*CHQConfigExtension) UnregisterCallback

func (chq *CHQConfigExtension) UnregisterCallback(id int)

type Config

type Config struct {
	Source        ConfigSourceConfig `mapstructure:"source"`
	CheckInterval time.Duration      `mapstructure:"check_interval"`
}

func (*Config) Validate

func (cfg *Config) Validate() error

type ConfigSourceConfig

type ConfigSourceConfig struct {
	confighttp.ClientConfig `mapstructure:",squash"`
	// contains filtered or unexported fields
}

func (*ConfigSourceConfig) Validate

func (cfg *ConfigSourceConfig) Validate() error

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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