tempo

package
v0.18.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPushConfig = PushConfig{
	Compression: compressionGzip,
}

DefaultPushConfig holds the default settings for a PushConfig.

View Source
var DefaultRemoteWriteConfig = RemoteWriteConfig{
	Compression: compressionGzip,
	Protocol:    protocolGRPC,
}

DefaultRemoteWriteConfig holds the default settings for a PushConfig.

Functions

This section is empty.

Types

type Config

type Config struct {
	Configs []InstanceConfig `yaml:"configs,omitempty"`
}

Config controls the configuration of Tempo trace pipelines.

func (*Config) UnmarshalYAML

func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements yaml.Unmarshaler.

func (*Config) Validate added in v0.12.0

func (c *Config) Validate(lokiConfig *loki.Config) error

Validate ensures that the Config is valid.

type Instance added in v0.12.0

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

Instance wraps the OpenTelemetry collector to enable tracing pipelines

func NewInstance added in v0.12.0

func NewInstance(loki *loki.Loki, reg prometheus.Registerer, cfg InstanceConfig, logger *zap.Logger, promInstanceManager instance.Manager) (*Instance, error)

NewInstance creates and starts an instance of tracing pipelines.

func (*Instance) ApplyConfig added in v0.13.0

func (i *Instance) ApplyConfig(loki *loki.Loki, promInstanceManager instance.Manager, cfg InstanceConfig) error

ApplyConfig updates the configuration of the Instance.

func (*Instance) GetExporters added in v0.12.0

GetExporters implements component.Host

func (*Instance) GetExtensions added in v0.12.0

func (i *Instance) GetExtensions() map[configmodels.Extension]component.ServiceExtension

GetExtensions implements component.Host

func (*Instance) GetFactory added in v0.12.0

func (i *Instance) GetFactory(kind component.Kind, componentType configmodels.Type) component.Factory

GetFactory implements component.Host

func (*Instance) ReportFatalError added in v0.12.0

func (i *Instance) ReportFatalError(err error)

ReportFatalError implements component.Host

func (*Instance) Stop added in v0.12.0

func (i *Instance) Stop()

Stop stops the OpenTelemetry collector subsystem

type InstanceConfig added in v0.12.0

type InstanceConfig struct {
	Name string `yaml:"name"`

	// Deprecated in favor of RemoteWrite and Batch.
	PushConfig PushConfig `yaml:"push_config,omitempty"`

	// RemoteWrite defines one or multiple backends that can receive the pipeline's traffic.
	RemoteWrite []RemoteWriteConfig `yaml:"remote_write,omitempty"`

	// Receivers: https://github.com/open-telemetry/opentelemetry-collector/blob/7d7ae2eb34b5d387627875c498d7f43619f37ee3/receiver/README.md
	Receivers map[string]interface{} `yaml:"receivers,omitempty"`

	// Batch: https://github.com/open-telemetry/opentelemetry-collector/blob/7d7ae2eb34b5d387627875c498d7f43619f37ee3/processor/batchprocessor/config.go#L24
	Batch map[string]interface{} `yaml:"batch,omitempty"`

	// Attributes: https://github.com/open-telemetry/opentelemetry-collector/blob/7d7ae2eb34b5d387627875c498d7f43619f37ee3/processor/attributesprocessor/config.go#L30
	Attributes map[string]interface{} `yaml:"attributes,omitempty"`

	// prom service discovery
	ScrapeConfigs []interface{} `yaml:"scrape_configs,omitempty"`

	// SpanMetricsProcessor: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/spanmetricsprocessor/README.md
	SpanMetrics *SpanMetricsConfig `yaml:"spanmetrics,omitempty"`

	// AutomaticLogging
	AutomaticLogging *automaticloggingprocessor.AutomaticLoggingConfig `yaml:"automatic_logging,omitempty"`

	// TailSampling defines a sampling strategy for the pipeline
	TailSampling *tailSamplingConfig `yaml:"tail_sampling"`
}

InstanceConfig configures an individual Tempo trace pipeline.

type PushConfig added in v0.7.2

type PushConfig struct {
	Endpoint           string                 `yaml:"endpoint,omitempty"`
	Compression        string                 `yaml:"compression,omitempty"`
	Insecure           bool                   `yaml:"insecure,omitempty"`
	InsecureSkipVerify bool                   `yaml:"insecure_skip_verify,omitempty"`
	BasicAuth          *prom_config.BasicAuth `yaml:"basic_auth,omitempty,omitempty"`
	Batch              map[string]interface{} `yaml:"batch,omitempty"`            // https://github.com/open-telemetry/opentelemetry-collector/blob/7d7ae2eb34b5d387627875c498d7f43619f37ee3/processor/batchprocessor/config.go#L24
	SendingQueue       map[string]interface{} `yaml:"sending_queue,omitempty"`    // https://github.com/open-telemetry/opentelemetry-collector/blob/7d7ae2eb34b5d387627875c498d7f43619f37ee3/exporter/exporterhelper/queued_retry.go#L30
	RetryOnFailure     map[string]interface{} `yaml:"retry_on_failure,omitempty"` // https://github.com/open-telemetry/opentelemetry-collector/blob/7d7ae2eb34b5d387627875c498d7f43619f37ee3/exporter/exporterhelper/queued_retry.go#L54
}

PushConfig controls the configuration of exporting to Grafana Cloud

func (*PushConfig) UnmarshalYAML added in v0.14.0

func (c *PushConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements yaml.Unmarshaler.

type RemoteWriteConfig added in v0.14.0

type RemoteWriteConfig struct {
	Endpoint    string `yaml:"endpoint,omitempty"`
	Compression string `yaml:"compression,omitempty"`
	Protocol    string `yaml:"protocol,omitempty"`
	Insecure    bool   `yaml:"insecure,omitempty"`
	// Deprecated
	InsecureSkipVerify bool                   `yaml:"insecure_skip_verify,omitempty"`
	TLSConfig          *prom_config.TLSConfig `yaml:"tls_config,omitempty"`
	BasicAuth          *prom_config.BasicAuth `yaml:"basic_auth,omitempty"`
	Headers            map[string]string      `yaml:"headers,omitempty"`
	SendingQueue       map[string]interface{} `yaml:"sending_queue,omitempty"`    // https://github.com/open-telemetry/opentelemetry-collector/blob/7d7ae2eb34b5d387627875c498d7f43619f37ee3/exporter/exporterhelper/queued_retry.go#L30
	RetryOnFailure     map[string]interface{} `yaml:"retry_on_failure,omitempty"` // https://github.com/open-telemetry/opentelemetry-collector/blob/7d7ae2eb34b5d387627875c498d7f43619f37ee3/exporter/exporterhelper/queued_retry.go#L54
}

RemoteWriteConfig controls the configuration of an exporter

func (*RemoteWriteConfig) UnmarshalYAML added in v0.14.0

func (c *RemoteWriteConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements yaml.Unmarshaler.

type SpanMetricsConfig added in v0.14.0

type SpanMetricsConfig struct {
	LatencyHistogramBuckets []time.Duration                  `yaml:"latency_histogram_buckets,omitempty"`
	Dimensions              []spanmetricsprocessor.Dimension `yaml:"dimensions,omitempty"`
	// Namespace if set, exports metrics under the provided value.
	Namespace string `yaml:"namespace,omitempty"`
	// ConstLabels are values that are applied for every exported metric.
	ConstLabels map[string]interface{} `yaml:"const_labels,omitempty"`
	// PromInstance is the Agent's prometheus instance that will be used to push metrics
	PromInstance string `yaml:"prom_instance"`
	// HandlerEndpoint is the address where a prometheus exporter will be exposed
	HandlerEndpoint string `yaml:"handler_endpoint"`
}

SpanMetricsConfig controls the configuration of spanmetricsprocessor and the related metrics exporter.

type Tempo

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

Tempo wraps the OpenTelemetry collector to enable tracing pipelines

func New

func New(loki *loki.Loki, promInstanceManager instance.Manager, reg prom_client.Registerer, cfg Config, level logrus.Level) (*Tempo, error)

New creates and starts Loki log collection.

func (*Tempo) ApplyConfig added in v0.13.0

func (t *Tempo) ApplyConfig(loki *loki.Loki, promInstanceManager instance.Manager, cfg Config, level logrus.Level) error

ApplyConfig updates Tempo with a new Config.

func (*Tempo) Stop

func (t *Tempo) Stop()

Stop stops the OpenTelemetry collector subsystem

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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