dynamicconfig

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

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

Go to latest
Published: Aug 21, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

README

Dynamic Configuration Service

The dynamic configuration service implements a system in which telemetry configurations can be updated at runtime via communication with a configuration service. Currently, on metric schedules are supported.

Note: this feature is experimental. Use at your own risk.

Resources

For an explanation of this system, please see the experimental specification.

To see it in action, check out this example.

Its counterpart on the Go contrib SDK is available here.

Running the integration test

An integration test suite is included with this component. To run it, ensure you are in the directory integration_test, and do

go test -tags=integration -v

It will take ~12 minutes to run.

Documentation

Overview

Package dynamicconfig implements an extension that enables dynamically configuring metric collection schedule, trace parameters, and other tunable knobs on an instrumented system. At the moment, only metric collection schedules have been implemented.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	configmodels.ExtensionSettings `mapstructure:",squash"`

	// Endpoint is the address and port used to communicate the config updates
	// to the SDK. The default value is localhost:55700.
	Endpoint string `mapstructure:"endpoint"`

	// RemoteConfigAddress is the address of an upstream remote configuration
	// service. If specified, the upstream remote configuration service will be
	// used as the source of config updates. Requests for config updates from
	// this collector will receive updates from the upstream configuration
	// service. If both "RemoteConfigAddress" and "LocalConfigFile" are
	// specified, then "RemoteConfigAddress" will take precedence.
	RemoteConfigAddress string `mapstructure:"remote_config_address"`

	// LocalConfigFile is the local record of configuration updates, applied
	// when a third-party config service backend is not used. If this file is
	// not specified, and no other config backends are specified, then it
	// defaults to the file "schedules.yaml", located in the same directory as
	// the collector-wide config. If both "LocalConfigFile" and
	// "RemoteConfigAddress" are specified, then "RemoteConfigAddress" takes
	// precedence.
	LocalConfigFile string `mapstructure:"local_config_file"`

	// WaitTime is the suggested time, in seconds, for the client to wait
	// before querying the collector for an updated configuration. Defaults to
	// 30 seconds.
	WaitTime int `mapstructure:"wait_time"`
}

Config has the configuration for the extension enabling the dynamic configuration service

type Factory

type Factory struct{}

Factory is the factory for the extension.

func (*Factory) CreateDefaultConfig

func (f *Factory) CreateDefaultConfig() configmodels.Extension

CreateDefaultConfig creates the default configuration for the extension.

func (*Factory) CreateExtension

CreateExtension creates the extension based on this config.

func (*Factory) Type

func (f *Factory) Type() configmodels.Type

Type gets the type of the config created by this factory.

Directories

Path Synopsis
Package model contains data structures intended to be in-memory representations of config information passed to a file backend.
Package model contains data structures intended to be in-memory representations of config information passed to a file backend.
proto
Package service implements the server side of the dynamic config service, including a local, file-based backend and a remote backend.
Package service implements the server side of the dynamic config service, including a local, file-based backend and a remote backend.

Jump to

Keyboard shortcuts

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