spanstore

package
v1.11.999 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrTraceNotFound is returned by Reader's GetTrace if no data is found for given trace ID.
	ErrTraceNotFound = errors.New("trace not found")
)

Functions

This section is empty.

Types

type CompositeWriter added in v1.3.0

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

CompositeWriter is a span Writer that tries to save spans into several underlying span Writers

func NewCompositeWriter added in v1.3.0

func NewCompositeWriter(spanWriters ...Writer) *CompositeWriter

NewCompositeWriter creates a CompositeWriter

func (*CompositeWriter) WriteSpan added in v1.3.0

func (c *CompositeWriter) WriteSpan(span *model.Span) error

WriteSpan calls WriteSpan on each span writer. It will sum up failures, it is not transactional

type DownsamplingOptions added in v1.11.999

type DownsamplingOptions struct {
	Ratio          float64
	HashSalt       string
	MetricsFactory metrics.Factory
}

DownsamplingOptions contains the options for constructing a DownsamplingWriter.

type DownsamplingWriter added in v1.11.999

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

DownsamplingWriter is a span Writer that drops spans with a predefined downsamplingRatio.

func NewDownsamplingWriter added in v1.11.999

func NewDownsamplingWriter(spanWriter Writer, downsamplingOptions DownsamplingOptions) *DownsamplingWriter

NewDownsamplingWriter creates a DownsamplingWriter.

func (*DownsamplingWriter) WriteSpan added in v1.11.999

func (ds *DownsamplingWriter) WriteSpan(span *model.Span) error

WriteSpan calls WriteSpan on wrapped span writer.

type Reader

type Reader interface {
	GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error)
	GetServices(ctx context.Context) ([]string, error)
	GetOperations(ctx context.Context, service string) ([]string, error)
	FindTraces(ctx context.Context, query *TraceQueryParameters) ([]*model.Trace, error)
	FindTraceIDs(ctx context.Context, query *TraceQueryParameters) ([]model.TraceID, error)
}

Reader finds and loads traces and other data from storage.

type TraceQueryParameters

type TraceQueryParameters struct {
	ServiceName   string
	OperationName string
	Tags          map[string]string
	StartTimeMin  time.Time
	StartTimeMax  time.Time
	DurationMin   time.Duration
	DurationMax   time.Duration
	NumTraces     int
}

TraceQueryParameters contains parameters of a trace query.

type Writer

type Writer interface {
	WriteSpan(span *model.Span) error
}

Writer writes spans to storage.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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