servicegraph

package
v0.39.1 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultArguments = Arguments{
	LatencyHistogramBuckets: []time.Duration{
		2 * time.Millisecond,
		4 * time.Millisecond,
		6 * time.Millisecond,
		8 * time.Millisecond,
		10 * time.Millisecond,
		50 * time.Millisecond,
		100 * time.Millisecond,
		200 * time.Millisecond,
		400 * time.Millisecond,
		800 * time.Millisecond,
		1 * time.Second,
		1400 * time.Millisecond,
		2 * time.Second,
		5 * time.Second,
		10 * time.Second,
		15 * time.Second,
	},
	Dimensions: []string{},
	Store: StoreConfig{
		MaxItems: 1000,
		TTL:      2 * time.Second,
	},
	CacheLoop:           1 * time.Minute,
	StoreExpirationLoop: 2 * time.Second,
}

DefaultArguments holds default settings for Arguments.

Functions

This section is empty.

Types

type Arguments

type Arguments struct {
	// LatencyHistogramBuckets is the list of durations representing latency histogram buckets.
	LatencyHistogramBuckets []time.Duration `river:"latency_histogram_buckets,attr,optional"`

	// Dimensions defines the list of additional dimensions on top of the provided:
	// - client
	// - server
	// - failed
	// - connection_type
	// The dimensions will be fetched from the span's attributes. Examples of some conventionally used attributes:
	// https://github.com/open-telemetry/opentelemetry-collector/blob/main/model/semconv/opentelemetry.go.
	Dimensions []string `river:"dimensions,attr,optional"`

	// Store contains the config for the in-memory store used to find requests between services by pairing spans.
	Store StoreConfig `river:"store,block,optional"`
	// CacheLoop defines how often to clean the cache of stale series.
	CacheLoop time.Duration `river:"cache_loop,attr,optional"`
	// StoreExpirationLoop defines how often to expire old entries from the store.
	StoreExpirationLoop time.Duration `river:"store_expiration_loop,attr,optional"`

	// Output configures where to send processed data. Required.
	Output *otelcol.ConsumerArguments `river:"output,block"`
}

Arguments configures the otelcol.connector.servicegraph component.

func (Arguments) ConnectorType

func (Arguments) ConnectorType() int

ConnectorType() int implements connector.Arguments.

func (Arguments) Convert

func (args Arguments) Convert() (otelcomponent.Config, error)

Convert implements connector.Arguments.

func (Arguments) Exporters

Exporters implements connector.Arguments.

func (Arguments) Extensions

func (args Arguments) Extensions() map[otelcomponent.ID]otelextension.Extension

Extensions implements connector.Arguments.

func (Arguments) NextConsumers

func (args Arguments) NextConsumers() *otelcol.ConsumerArguments

NextConsumers implements connector.Arguments.

func (*Arguments) SetToDefault

func (args *Arguments) SetToDefault()

SetToDefault implements river.Defaulter.

func (*Arguments) Validate

func (args *Arguments) Validate() error

Validate implements river.Validator.

type StoreConfig

type StoreConfig struct {
	// MaxItems is the maximum number of items to keep in the store.
	MaxItems int `river:"max_items,attr,optional"`
	// TTL is the time to live for items in the store.
	TTL time.Duration `river:"ttl,attr,optional"`
}

Jump to

Keyboard shortcuts

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