config

package
v1.39.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 22 Imported by: 42

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHTTPRoundTripper added in v1.19.0

func GetHTTPRoundTripper(c *Configuration, logger *zap.Logger) (http.RoundTripper, error)

GetHTTPRoundTripper returns configured http.RoundTripper

Types

type ClientBuilder added in v0.6.0

type ClientBuilder interface {
	NewClient(logger *zap.Logger, metricsFactory metrics.Factory) (es.Client, error)
	GetRemoteReadClusters() []string
	GetNumShards() int64
	GetNumReplicas() int64
	GetMaxSpanAge() time.Duration
	GetMaxDocCount() int
	GetIndexPrefix() string
	GetIndexDateLayoutSpans() string
	GetIndexDateLayoutServices() string
	GetIndexDateLayoutDependencies() string
	GetIndexRolloverFrequencySpansDuration() time.Duration
	GetIndexRolloverFrequencyServicesDuration() time.Duration
	GetTagsFilePath() string
	GetAllTagsAsFields() bool
	GetTagDotReplacement() string
	GetUseReadWriteAliases() bool
	GetTokenFilePath() string
	IsStorageEnabled() bool
	IsCreateIndexTemplates() bool
	GetVersion() uint
	TagKeysAsFields() ([]string, error)
	GetUseILM() bool
	GetLogLevel() string
	GetSendGetBodyAs() string
}

ClientBuilder creates new es.Client

type Configuration

type Configuration struct {
	Servers                        []string       `mapstructure:"server_urls"`
	RemoteReadClusters             []string       `mapstructure:"remote_read_clusters"`
	Username                       string         `mapstructure:"username"`
	Password                       string         `mapstructure:"password" json:"-"`
	TokenFilePath                  string         `mapstructure:"token_file"`
	AllowTokenFromContext          bool           `mapstructure:"-"`
	Sniffer                        bool           `mapstructure:"sniffer"` // https://github.com/olivere/elastic/wiki/Sniffing
	SnifferTLSEnabled              bool           `mapstructure:"sniffer_tls_enabled"`
	MaxDocCount                    int            `mapstructure:"-"`                     // Defines maximum number of results to fetch from storage per query
	MaxSpanAge                     time.Duration  `yaml:"max_span_age" mapstructure:"-"` // configures the maximum lookback on span reads
	NumShards                      int64          `yaml:"shards" mapstructure:"num_shards"`
	NumReplicas                    int64          `yaml:"replicas" mapstructure:"num_replicas"`
	Timeout                        time.Duration  `validate:"min=500" mapstructure:"-"`
	BulkSize                       int            `mapstructure:"-"`
	BulkWorkers                    int            `mapstructure:"-"`
	BulkActions                    int            `mapstructure:"-"`
	BulkFlushInterval              time.Duration  `mapstructure:"-"`
	IndexPrefix                    string         `mapstructure:"index_prefix"`
	IndexDateLayoutSpans           string         `mapstructure:"-"`
	IndexDateLayoutServices        string         `mapstructure:"-"`
	IndexDateLayoutDependencies    string         `mapstructure:"-"`
	IndexRolloverFrequencySpans    string         `mapstructure:"-"`
	IndexRolloverFrequencyServices string         `mapstructure:"-"`
	Tags                           TagsAsFields   `mapstructure:"tags_as_fields"`
	Enabled                        bool           `mapstructure:"-"`
	TLS                            tlscfg.Options `mapstructure:"tls"`
	UseReadWriteAliases            bool           `mapstructure:"use_aliases"`
	CreateIndexTemplates           bool           `mapstructure:"create_mappings"`
	UseILM                         bool           `mapstructure:"use_ilm"`
	Version                        uint           `mapstructure:"version"`
	LogLevel                       string         `mapstructure:"log_level"`
	SendGetBodyAs                  string         `mapstructure:"send_get_body_as"`
}

Configuration describes the configuration properties needed to connect to an ElasticSearch cluster

func (*Configuration) ApplyDefaults added in v0.6.0

func (c *Configuration) ApplyDefaults(source *Configuration)

ApplyDefaults copies settings from source unless its own value is non-zero.

func (*Configuration) GetAllTagsAsFields added in v1.7.0

func (c *Configuration) GetAllTagsAsFields() bool

GetAllTagsAsFields returns true if all tags should be stored as object fields

func (*Configuration) GetIndexDateLayoutDependencies added in v1.23.0

func (c *Configuration) GetIndexDateLayoutDependencies() string

GetIndexDateLayoutDependencies returns jaeger-dependencies index date layout

func (*Configuration) GetIndexDateLayoutServices added in v1.23.0

func (c *Configuration) GetIndexDateLayoutServices() string

GetIndexDateLayoutServices returns jaeger-service index date layout

func (*Configuration) GetIndexDateLayoutSpans added in v1.23.0

func (c *Configuration) GetIndexDateLayoutSpans() string

GetIndexDateLayoutSpans returns jaeger-span index date layout

func (*Configuration) GetIndexPrefix added in v1.7.0

func (c *Configuration) GetIndexPrefix() string

GetIndexPrefix returns index prefix

func (*Configuration) GetIndexRolloverFrequencyServicesDuration added in v1.23.0

func (c *Configuration) GetIndexRolloverFrequencyServicesDuration() time.Duration

GetIndexRolloverFrequencyServicesDuration returns jaeger-service index rollover frequency duration

func (*Configuration) GetIndexRolloverFrequencySpansDuration added in v1.23.0

func (c *Configuration) GetIndexRolloverFrequencySpansDuration() time.Duration

GetIndexRolloverFrequencySpansDuration returns jaeger-span index rollover frequency duration

func (*Configuration) GetLogLevel added in v1.23.0

func (c *Configuration) GetLogLevel() string

GetLogLevel returns the log-level the ES client should log at.

func (*Configuration) GetMaxDocCount added in v1.20.0

func (c *Configuration) GetMaxDocCount() int

GetMaxDocCount returns the maximum number of documents that a query should return

func (*Configuration) GetMaxSpanAge added in v0.6.0

func (c *Configuration) GetMaxSpanAge() time.Duration

GetMaxSpanAge returns max span age from Configuration

func (*Configuration) GetNumReplicas added in v0.6.0

func (c *Configuration) GetNumReplicas() int64

GetNumReplicas returns number of replicas from Configuration

func (*Configuration) GetNumShards added in v0.6.0

func (c *Configuration) GetNumShards() int64

GetNumShards returns number of shards from Configuration

func (*Configuration) GetRemoteReadClusters added in v1.23.0

func (c *Configuration) GetRemoteReadClusters() []string

GetRemoteReadClusters returns list of remote read clusters

func (*Configuration) GetSendGetBodyAs added in v1.26.0

func (c *Configuration) GetSendGetBodyAs() string

GetSendGetBodyAs returns the SendGetBodyAs the ES client should use.

func (*Configuration) GetTagDotReplacement added in v1.7.0

func (c *Configuration) GetTagDotReplacement() string

GetTagDotReplacement returns character is used to replace dots in tag keys, when the tag is stored as object field.

func (*Configuration) GetTagsFilePath added in v1.7.0

func (c *Configuration) GetTagsFilePath() string

GetTagsFilePath returns a path to file containing tag keys

func (*Configuration) GetTokenFilePath added in v1.10.0

func (c *Configuration) GetTokenFilePath() string

GetTokenFilePath returns file path containing the bearer token

func (*Configuration) GetUseILM added in v1.22.0

func (c *Configuration) GetUseILM() bool

GetUseILM indicates whether ILM should be used

func (*Configuration) GetUseReadWriteAliases added in v1.10.0

func (c *Configuration) GetUseReadWriteAliases() bool

GetUseReadWriteAliases indicates whether read alias should be used

func (*Configuration) GetVersion added in v1.14.0

func (c *Configuration) GetVersion() uint

GetVersion returns Elasticsearch version

func (*Configuration) IsCreateIndexTemplates added in v1.14.0

func (c *Configuration) IsCreateIndexTemplates() bool

IsCreateIndexTemplates determines whether index templates should be created or not

func (*Configuration) IsStorageEnabled added in v1.18.0

func (c *Configuration) IsStorageEnabled() bool

IsStorageEnabled determines whether storage is enabled

func (*Configuration) NewClient

func (c *Configuration) NewClient(logger *zap.Logger, metricsFactory metrics.Factory) (es.Client, error)

NewClient creates a new ElasticSearch client

func (*Configuration) TagKeysAsFields added in v1.19.0

func (c *Configuration) TagKeysAsFields() ([]string, error)

TagKeysAsFields returns tags from the file and command line merged

type TagsAsFields added in v1.18.0

type TagsAsFields struct {
	// Store all tags as object fields, instead nested objects
	AllAsFields bool `mapstructure:"all"`
	// Dot replacement for tag keys when stored as object fields
	DotReplacement string `mapstructure:"dot_replacement"`
	// File path to tag keys which should be stored as object fields
	File string `mapstructure:"config_file"`
	// Comma delimited list of tags to store as object fields
	Include string `mapstructure:"include"`
}

TagsAsFields holds configuration for tag schema. By default Jaeger stores tags in an array of nested objects. This configurations allows to store tags as object fields for better Kibana support.

Jump to

Keyboard shortcuts

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