elasticsearch

package
v0.0.0-...-9f9574b Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package elasticsearch implements Jaeger Elasticsearch storage as OpenTelemetry exporter.

Index

Constants

View Source
const (
	// TypeStr defines type of the Elasticsearch exporter.
	TypeStr = "jaeger_elasticsearch"
)

Variables

This section is empty.

Functions

func CreateOptions

func CreateOptions() *es.Options

CreateOptions creates Elasticsearch options supported by this exporter.

func New

func New(config *Config, log *zap.Logger) (exporter.TraceExporter, error)

New creates Elasticsearch exporter/storage.

Types

type Config

type Config struct {
	configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct.
	// Servers define Elasticsearch server URLs e.g. http://localhost:9200
	Servers []string `mapstructure:"server_urls"`
	// Shards define number of primary shards
	Shards uint `mapstructure:"shards"`
	// Replicas define number of replica shards
	Replicas uint `mapstructure:"replicas"`
	// Version defines Elasticsearch version. 0 means that ES version will be obtained from ping endpoint at startup.
	Version uint `mapstructure:"version"`
	// CreateTemplates defines whether Jaeger templates will be installed to Elasticsearch at startup.
	CreateTemplates bool `mapstructure:"create_mappings"`
	// IndexPrefix defines options prefix of Jaeger indices. For example "production" creates "production-jaeger-*"
	IndexPrefix string `mapstructure:"index_prefix"`
	// Configures ES client to use sniffing process to find all nodes automatically
	Sniffer bool `mapstructure:"sniffer"`
	// Use aliases to enable Elasticsearch Rollover
	UseWriteAlias bool `mapstructure:"use_aliases"`

	Password string `mapstructure:"password"`
	Username string `mapstructure:"username"`
	// Path to a file containing bearer token
	TokenFile string `mapstructure:"token_file"`

	TagsAsFields TagsAsFields `mapstructure:"tags_as_fields"`
	// contains filtered or unexported fields
}

Config holds configuration of Jaeger Elasticserch exporter/storage.

type Factory

type Factory struct {
	Options Options
}

Factory is the factory for Jaeger Elasticsearch exporter.

func (Factory) CreateDefaultConfig

func (f Factory) CreateDefaultConfig() configmodels.Exporter

CreateDefaultConfig returns default configuration of Factory.

func (Factory) CreateMetricsExporter

func (Factory) CreateMetricsExporter(*zap.Logger, configmodels.Exporter) (exporter.MetricsExporter, error)

CreateMetricsExporter is not implemented.

func (Factory) CreateTraceExporter

func (Factory) CreateTraceExporter(log *zap.Logger, cfg configmodels.Exporter) (exporter.TraceExporter, error)

CreateTraceExporter creates Jaeger Elasticsearch trace exporter.

func (Factory) Type

func (Factory) Type() string

Type gets the type of exporter.

type Options

type Options func() *es.Options

Options returns initialized es.Options structure.

type TagsAsFields

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"`
}

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