spanstore

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrServiceNameNotSet occurs when attempting to query with an empty service name
	ErrServiceNameNotSet = errors.New("Service Name must be set")

	// ErrStartTimeMinGreaterThanMax occurs when start time min is above start time max
	ErrStartTimeMinGreaterThanMax = errors.New("Start Time Minimum is above Maximum")

	// ErrDurationMinGreaterThanMax occurs when duration min is above duration max
	ErrDurationMinGreaterThanMax = errors.New("Duration Minimum is above Maximum")

	// ErrMalformedRequestObject occurs when a request object is nil
	ErrMalformedRequestObject = errors.New("Malformed request object")

	// ErrDurationAndTagQueryNotSupported occurs when duration and tags are both set
	ErrDurationAndTagQueryNotSupported = errors.New("Cannot query for duration and tags simultaneously")

	// ErrStartAndEndTimeNotSet occurs when start time and end time are not set
	ErrStartAndEndTimeNotSet = errors.New("Start and End Time must be set")
)

Functions

This section is empty.

Types

type OperationNamesStorage

type OperationNamesStorage struct {
	// CQL statements are public so that Cassandra2 storage can override them
	InsertStmt string
	QueryStmt  string
	// contains filtered or unexported fields
}

OperationNamesStorage stores known operation names by service.

func NewOperationNamesStorage

func NewOperationNamesStorage(
	session cassandra.Session,
	writeCacheTTL time.Duration,
	metricsFactory metrics.Factory,
	logger *zap.Logger,
) *OperationNamesStorage

NewOperationNamesStorage returns a new OperationNamesStorage

func (*OperationNamesStorage) GetOperations

func (s *OperationNamesStorage) GetOperations(service string) ([]string, error)

GetOperations returns all operations for a specific service traced by Jaeger

func (*OperationNamesStorage) Write

func (s *OperationNamesStorage) Write(serviceName string, operationName string) error

Write saves Operation and Service name tuples

type Option added in v0.9.0

type Option func(c *Options)

Option is a function that sets some option on the writer.

func IndexFilter added in v1.6.0

func IndexFilter(indexFilter dbmodel.IndexFilter) Option

IndexFilter can be provided to filter certain spans that should not be indexed.

func StoreIndexesOnly added in v1.2.0

func StoreIndexesOnly() Option

StoreIndexesOnly can be provided to skip storing spans, and only store span indexes.

func StoreWithoutIndexing added in v1.2.0

func StoreWithoutIndexing() Option

StoreWithoutIndexing can be provided to store spans without indexing them.

func TagFilter added in v0.9.0

func TagFilter(tagFilter dbmodel.TagFilter) Option

TagFilter can be provided to filter any tags that should not be indexed.

type Options added in v0.9.0

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

Options control behavior of the writer.

type ServiceNamesStorage

type ServiceNamesStorage struct {
	InsertStmt string
	QueryStmt  string
	// contains filtered or unexported fields
}

ServiceNamesStorage stores known service names.

func NewServiceNamesStorage

func NewServiceNamesStorage(
	session cassandra.Session,
	writeCacheTTL time.Duration,
	metricsFactory metrics.Factory,
	logger *zap.Logger,
) *ServiceNamesStorage

NewServiceNamesStorage returns a new ServiceNamesStorage

func (*ServiceNamesStorage) GetServices

func (s *ServiceNamesStorage) GetServices() ([]string, error)

GetServices returns all services traced by Jaeger

func (*ServiceNamesStorage) Write

func (s *ServiceNamesStorage) Write(serviceName string) error

Write saves a single service name

type SpanReader

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

SpanReader can query for and load traces from Cassandra.

func NewSpanReader

func NewSpanReader(
	session cassandra.Session,
	metricsFactory metrics.Factory,
	logger *zap.Logger,
) *SpanReader

NewSpanReader returns a new SpanReader.

func (*SpanReader) FindTraces

func (s *SpanReader) FindTraces(ctx context.Context, traceQuery *spanstore.TraceQueryParameters) ([]*model.Trace, error)

FindTraces retrieves traces that match the traceQuery

func (*SpanReader) GetOperations

func (s *SpanReader) GetOperations(ctx context.Context, service string) ([]string, error)

GetOperations returns all operations for a specific service traced by Jaeger

func (*SpanReader) GetServices

func (s *SpanReader) GetServices(ctx context.Context) ([]string, error)

GetServices returns all services traced by Jaeger

func (*SpanReader) GetTrace

func (s *SpanReader) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error)

GetTrace takes a traceID and returns a Trace associated with that traceID

type SpanWriter

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

SpanWriter handles all writes to Cassandra for the Jaeger data model

func NewSpanWriter

func NewSpanWriter(
	session cassandra.Session,
	writeCacheTTL time.Duration,
	metricsFactory metrics.Factory,
	logger *zap.Logger,
	options ...Option,
) *SpanWriter

NewSpanWriter returns a SpanWriter

func (*SpanWriter) Close added in v1.2.0

func (s *SpanWriter) Close() error

Close closes SpanWriter

func (*SpanWriter) WriteSpan

func (s *SpanWriter) WriteSpan(span *model.Span) error

WriteSpan saves the span into Cassandra

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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