opampextension

package module
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 25 Imported by: 2

README

OpAMP Agent Extension

Status
Stability alpha
Distributions contrib
Issues Open issues Closed issues
Code Owners @portertech, @evan-bradley, @tigrannajaryan

Configuration

The following settings are required:

  • server: The OpAMP server connection settings.
    • ws: The OpAMP websocket transport settings.
      • endpoint (no default): The OpAMP server websocket endpoint (URL).

The following settings are optional:

  • server: The OpAMP server connection settings.
    • ws: The OpAMP websocket transport settings.
      • tls: TLS settings.
      • headers: HTTP headers to set.
  • instance_uid: A ULID formatted as a 26 character string in canonical representation. Auto-generated on start if missing. Setting this ensures the instance UID remains constant across process restarts.
  • capabilities: Keys with boolean true/false values that enable a particular OpAMP capability.
    • reports_effective_config: Whether to enable the OpAMP ReportsEffectiveConfig capability. Default is true.
  • agent_description: Setting that modifies the agent description reported to the OpAMP server.
    • non_identifying_attributes: A map of key value pairs that will be added to the non-identifying attributes reported to the OpAMP server. If an attribute collides with the default non-identifying attributes that are automatically added, the ones specified here take precedence.
Example
extensions:
  opamp:
    server:
      ws:
        endpoint: wss://127.0.0.1:4320/v1/opamp

Status

This OpenTelemetry OpAMP agent extension is intended to support the OpAMP Supervisor.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() extension.Factory

Types

type AgentDescription added in v0.99.0

type AgentDescription struct {
	// NonIdentifyingAttributes are a map of key-value pairs that may be specified to provide
	// extra information about the agent to the OpAMP server.
	NonIdentifyingAttributes map[string]string `mapstructure:"non_identifying_attributes"`
}

type Capabilities added in v0.91.0

type Capabilities struct {
	// ReportsEffectiveConfig enables the OpAMP ReportsEffectiveConfig Capability. (default: true)
	ReportsEffectiveConfig bool `mapstructure:"reports_effective_config"`
}

type Config

type Config struct {
	Server *OpAMPServer `mapstructure:"server"`

	// InstanceUID is a ULID formatted as a 26 character string in canonical
	// representation. Auto-generated on start if missing.
	InstanceUID string `mapstructure:"instance_uid"`

	// Capabilities contains options to enable a particular OpAMP capability
	Capabilities Capabilities `mapstructure:"capabilities"`

	// Agent descriptions contains options to modify the AgentDescription message
	AgentDescription AgentDescription `mapstructure:"agent_description"`
}

Config contains the configuration for the opamp extension. Trying to mirror the OpAMP supervisor config for some consistency.

func (*Config) Validate

func (cfg *Config) Validate() error

Validate checks if the extension configuration is valid

type OpAMPServer

type OpAMPServer struct {
	WS   *commonFields `mapstructure:"ws,omitempty"`
	HTTP *commonFields `mapstructure:"http,omitempty"`
}

OpAMPServer contains the OpAMP transport configuration.

func (OpAMPServer) GetClient added in v0.96.0

func (s OpAMPServer) GetClient(logger *zap.Logger) client.OpAMPClient

func (OpAMPServer) GetEndpoint added in v0.96.0

func (s OpAMPServer) GetEndpoint() string

func (OpAMPServer) GetHeaders added in v0.96.0

func (s OpAMPServer) GetHeaders() map[string]configopaque.String

func (OpAMPServer) GetTLSSetting added in v0.96.0

func (s OpAMPServer) GetTLSSetting() configtls.ClientConfig

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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