common

package
v0.0.0-...-860e3c2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	config.ProcessorSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct

	// NumTraces is the max number of traces to keep in memory waiting for the duration.
	// Default: 1_000_000.
	NumTraces int `mapstructure:"num_traces"`

	// NumWorkers is a number of workers processing event queue. Should be equal to physical processors number.
	// Default: 1.
	NumWorkers int `mapstructure:"num_workers"`

	// WaitDuration tells the processor to wait for the specified duration for the trace to be complete.
	// Default: 1s.
	WaitDuration time.Duration `mapstructure:"wait_duration"`

	// DiscardOrphans instructs the processor to discard traces without the root span.
	// This typically indicates that the trace is incomplete.
	// Default: false.
	// Not yet implemented, and an error will be returned when this option is used.
	DiscardOrphans bool `mapstructure:"discard_orphans"`

	// StoreOnDisk tells the processor to keep only the trace ID in memory, serializing the trace spans to disk.
	// Useful when the duration to wait for traces to complete is high.
	// Default: false.
	// Not yet implemented, and an error will be returned when this option is used.
	StoreOnDisk bool `mapstructure:"store_on_disk"`
}

Config is the configuration for the processor.

type RingBuffer

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

RingBuffer keeps an in-memory bounded buffer with the in-flight trace IDs

func NewRingBuffer

func NewRingBuffer(size int) *RingBuffer

func (*RingBuffer) Contains

func (r *RingBuffer) Contains(traceID pcommon.TraceID) bool

func (*RingBuffer) Delete

func (r *RingBuffer) Delete(traceID pcommon.TraceID) bool

func (*RingBuffer) Put

func (r *RingBuffer) Put(traceID pcommon.TraceID) pcommon.TraceID

Jump to

Keyboard shortcuts

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