traces

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

DefaultRemoteWriteConfig holds the default settings for a PushConfig.

Functions

This section is empty.

Types

type Config

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

	// Unmarshaled is true when the Config was unmarshaled from YAML.
	Unmarshaled bool `yaml:"-"`
}

Config controls the configuration of Traces trace pipelines.

func (*Config) UnmarshalYAML

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

UnmarshalYAML implements yaml.Unmarshaler.

func (*Config) Validate

func (c *Config) Validate(logsConfig *logs.Config) error

Validate ensures that the Config is valid.

type InstanceConfig

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

	// 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/v0.96.0/receiver/README.md
	Receivers ReceiverMap `yaml:"receivers,omitempty"`

	// Batch:
	// https://github.com/open-telemetry/opentelemetry-collector/tree/v0.96.0/processor/batchprocessor
	Batch map[string]interface{} `yaml:"batch,omitempty"`

	// Attributes:
	// https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.96.0/processor
	Attributes map[string]interface{} `yaml:"attributes,omitempty"`

	// prom service discovery config
	ScrapeConfigs   []interface{} `yaml:"scrape_configs,omitempty"`
	OperationType   string        `yaml:"prom_sd_operation_type,omitempty"`
	PodAssociations []string      `yaml:"prom_sd_pod_associations,omitempty"`

	// SpanMetricsProcessor:
	SpanMetrics *SpanMetricsConfig `yaml:"spanmetrics,omitempty"`

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

	// TailSampling defines a sampling strategy for the pipeline
	// https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.96.0/processor/tailsamplingprocessor
	TailSampling *tailSamplingConfig `yaml:"tail_sampling,omitempty"`

	// LoadBalancing is used to distribute spans of the same trace to the same agent instance
	// https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.96.0/exporter/loadbalancingexporter
	LoadBalancing *loadBalancingConfig `yaml:"load_balancing"`

	// ServiceGraphs
	ServiceGraphs *serviceGraphsConfig `yaml:"service_graphs,omitempty"`

	// Jaeger's Remote Sampling extension:
	// https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.96.0/extension/jaegerremotesampling
	JaegerRemoteSampling []JaegerRemoteSamplingConfig `yaml:"jaeger_remote_sampling"`
}

InstanceConfig configures an individual Traces trace pipeline.

func (*InstanceConfig) OtelConfig

func (c *InstanceConfig) OtelConfig() (*otelcol.Config, error)

type JaegerRemoteSamplingConfig

type JaegerRemoteSamplingConfig map[string]interface{}

JaegerRemoteSamplingMap is a set of Jaeger Remote Sampling extensions. Because receivers may be configured with an unknown set of sensitive information, ReceiverMap will marshal as YAML to the text "<secret>".

func (JaegerRemoteSamplingConfig) MarshalYAML

func (jrsm JaegerRemoteSamplingConfig) MarshalYAML() (interface{}, error)

MarshalYAML implements yaml.Marshaler.

type OAuth2Config

type OAuth2Config struct {
	ClientID       string           `yaml:"client_id"`
	ClientSecret   SecretString     `yaml:"client_secret"`
	EndpointParams url.Values       `yaml:"endpoint_params,omitempty"`
	TokenURL       string           `yaml:"token_url"`
	Scopes         []string         `yaml:"scopes,omitempty"`
	TLS            TLSClientSetting `yaml:"tls,omitempty"`
	Timeout        time.Duration    `yaml:"timeout,omitempty"`
}

OAuth2Config configures the oauth2client extension for a remote_write exporter compatible with oauth2clientauthextension.Config

type ReceiverMap

type ReceiverMap map[string]interface{}

ReceiverMap stores a set of receivers. Because receivers may be configured with an unknown set of sensitive information, ReceiverMap will marshal as YAML to the text "<secret>".

func (ReceiverMap) MarshalYAML

func (r ReceiverMap) MarshalYAML() (interface{}, error)

MarshalYAML implements yaml.Marshaler.

func (*ReceiverMap) UnmarshalYAML

func (r *ReceiverMap) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements yaml.Unmarshaler.

type RemoteWriteConfig

type RemoteWriteConfig struct {
	Endpoint    string `yaml:"endpoint,omitempty"`
	Compression string `yaml:"compression,omitempty"`
	Protocol    string `yaml:"protocol,omitempty"`
	Insecure    bool   `yaml:"insecure,omitempty"`
	Format      string `yaml:"format,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"`
	Oauth2             *OAuth2Config          `yaml:"oauth2,omitempty"`
	Headers            map[string]string      `yaml:"headers,omitempty"`
	SendingQueue       map[string]interface{} `yaml:"sending_queue,omitempty"`    // https://github.com/open-telemetry/opentelemetry-collector/blob/v0.96.0/exporter/exporterhelper/queued_retry.go
	RetryOnFailure     map[string]interface{} `yaml:"retry_on_failure,omitempty"` // https://github.com/open-telemetry/opentelemetry-collector/blob/v0.96.0/exporter/exporterhelper/queued_retry.go
}

RemoteWriteConfig controls the configuration of an exporter

func (*RemoteWriteConfig) UnmarshalYAML

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

UnmarshalYAML implements yaml.Unmarshaler.

type SecretString

type SecretString string

A string type for secrets like passwords. Hides the value of the string during marshaling.

func (SecretString) MarshalYAML

func (s SecretString) MarshalYAML() (interface{}, error)

MarshalYAML implements yaml.Marshaler.

type SpanMetricsConfig

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 *prometheus.Labels `yaml:"const_labels,omitempty"`
	// MetricsInstance is the Agent's metrics instance that will be used to push metrics
	MetricsInstance string `yaml:"metrics_instance"`
	// HandlerEndpoint is the address where a prometheus exporter will be exposed
	HandlerEndpoint string `yaml:"handler_endpoint"`

	// DimensionsCacheSize defines the size of cache for storing Dimensions, which helps to avoid cache memory growing
	// indefinitely over the lifetime of the collector.
	DimensionsCacheSize int `yaml:"dimensions_cache_size"`

	// Defines the aggregation temporality of the generated metrics. Can be either of:
	// * "AGGREGATION_TEMPORALITY_CUMULATIVE"
	// * "AGGREGATION_TEMPORALITY_DELTA"
	AggregationTemporality string `yaml:"aggregation_temporality"`

	// MetricsEmitInterval is the time period between when metrics are flushed
	// or emitted to the configured MetricsInstance or HandlerEndpoint.
	MetricsFlushInterval time.Duration `yaml:"metrics_flush_interval"`
}

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

type TLSClientSetting

type TLSClientSetting struct {
	CAFile                   string        `yaml:"ca_file,omitempty"`
	CAPem                    SecretString  `yaml:"ca_pem,omitempty"`
	IncludeSystemCACertsPool bool          `yaml:"include_system_ca_certs_pool"`
	CertFile                 string        `yaml:"cert_file,omitempty"`
	CertPem                  SecretString  `yaml:"cert_pem,omitempty"`
	KeyFile                  string        `yaml:"key_file,omitempty"`
	KeyPem                   SecretString  `yaml:"key_pem,omitempty"`
	MinVersion               string        `yaml:"min_version,omitempty"`
	MaxVersion               string        `yaml:"max_version,omitempty"`
	CipherSuites             []string      `yaml:"cipher_suites,omitempty"`
	ReloadInterval           time.Duration `yaml:"reload_interval"`
	Insecure                 bool          `yaml:"insecure"`
	InsecureSkipVerify       bool          `yaml:"insecure_skip_verify"`
	ServerNameOverride       string        `yaml:"server_name_override,omitempty"`
}

TLSClientSetting configures the oauth2client extension TLS; compatible with configtls.TLSClientSetting

Jump to

Keyboard shortcuts

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