collect

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrWouldBlock = errors.New("not adding span, channel buffer is full")

Functions

This section is empty.

Types

type Collector

type Collector interface {
	// AddSpan adds a span to be collected, buffered, and merged in to a trace.
	// Once the trace is "complete", it'll be passed off to the sampler then
	// scheduled for transmission.
	AddSpan(*types.Span) error
	AddSpanFromPeer(*types.Span) error
}

func GetCollectorImplementation

func GetCollectorImplementation(c config.Config) Collector

type InMemCollector

type InMemCollector struct {
	Config         config.Config          `inject:""`
	Logger         logger.Logger          `inject:""`
	Transmission   transmit.Transmission  `inject:"upstreamTransmission"`
	Metrics        metrics.Metrics        `inject:"metrics"`
	SamplerFactory *sample.SamplerFactory `inject:""`

	// For test use only
	BlockOnAddSpan bool
	// contains filtered or unexported fields
}

InMemCollector is a single threaded collector

func (*InMemCollector) AddSpan

func (i *InMemCollector) AddSpan(sp *types.Span) error

AddSpan accepts the incoming span to a queue and returns immediately

func (*InMemCollector) AddSpanFromPeer

func (i *InMemCollector) AddSpanFromPeer(sp *types.Span) error

AddSpan accepts the incoming span to a queue and returns immediately

func (*InMemCollector) Start

func (i *InMemCollector) Start() error

func (*InMemCollector) Stop

func (i *InMemCollector) Stop() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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