Documentation ¶
Index ¶
- Variables
- type CacheStore
- type SpanWriter
- type TraceReader
- func (r *TraceReader) FindTraceIDs(ctx context.Context, query *spanstore.TraceQueryParameters) ([]model.TraceID, error)
- func (r *TraceReader) FindTraces(ctx context.Context, query *spanstore.TraceQueryParameters) ([]*model.Trace, error)
- func (r *TraceReader) GetOperations(ctx context.Context, query spanstore.OperationQueryParameters) ([]spanstore.Operation, error)
- func (r *TraceReader) GetServices(ctx context.Context) ([]string, error)
- func (r *TraceReader) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error)
Constants ¶
This section is empty.
Variables ¶
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("min start time is above max") // ErrDurationMinGreaterThanMax occurs when duration min is above duration max ErrDurationMinGreaterThanMax = errors.New("min duration is above max") // ErrMalformedRequestObject occurs when a request object is nil ErrMalformedRequestObject = errors.New("malformed request object") // ErrStartAndEndTimeNotSet occurs when start time and end time are not set ErrStartAndEndTimeNotSet = errors.New("start and end time must be set") // ErrUnableToFindTraceIDAggregation occurs when an aggregation query for TraceIDs fail. ErrUnableToFindTraceIDAggregation = errors.New("could not find aggregation of traceIDs") // ErrNotSupported during development, don't support every option - yet ErrNotSupported = errors.New("this query parameter is not supported yet") // ErrInternalConsistencyError indicates internal data consistency issue ErrInternalConsistencyError = errors.New("internal data consistency issue") )
Functions ¶
This section is empty.
Types ¶
type CacheStore ¶
type CacheStore struct {
// contains filtered or unexported fields
}
CacheStore saves expensive calculations from the K/V store
func NewCacheStore ¶
func NewCacheStore(db *badger.DB, ttl time.Duration, prefill bool) *CacheStore
NewCacheStore returns initialized CacheStore for badger use
func (*CacheStore) GetOperations ¶
func (c *CacheStore) GetOperations(service string) ([]spanstore.Operation, error)
GetOperations returns all operations for a specific service & spanKind traced by Jaeger
func (*CacheStore) GetServices ¶
func (c *CacheStore) GetServices() ([]string, error)
GetServices returns all services traced by Jaeger
func (*CacheStore) Update ¶
func (c *CacheStore) Update(service, operation string, expireTime uint64)
Update caches the results of service and service + operation indexes and maintains their TTL
type SpanWriter ¶
type SpanWriter struct {
// contains filtered or unexported fields
}
SpanWriter for writing spans to badger
func NewSpanWriter ¶
func NewSpanWriter(db *badger.DB, c *CacheStore, ttl time.Duration) *SpanWriter
NewSpanWriter returns a SpawnWriter with cache
type TraceReader ¶
type TraceReader struct {
// contains filtered or unexported fields
}
TraceReader reads traces from the local badger store
func NewTraceReader ¶
func NewTraceReader(db *badger.DB, c *CacheStore) *TraceReader
NewTraceReader returns a TraceReader with cache
func (*TraceReader) FindTraceIDs ¶
func (r *TraceReader) FindTraceIDs(ctx context.Context, query *spanstore.TraceQueryParameters) ([]model.TraceID, error)
FindTraceIDs retrieves only the TraceIDs that match the traceQuery, but not the trace data
func (*TraceReader) FindTraces ¶
func (r *TraceReader) FindTraces(ctx context.Context, query *spanstore.TraceQueryParameters) ([]*model.Trace, error)
FindTraces retrieves traces that match the traceQuery
func (*TraceReader) GetOperations ¶
func (r *TraceReader) GetOperations( ctx context.Context, query spanstore.OperationQueryParameters, ) ([]spanstore.Operation, error)
GetOperations fetches operations in the service and empty slice if service does not exists
func (*TraceReader) GetServices ¶
func (r *TraceReader) GetServices(ctx context.Context) ([]string, error)
GetServices fetches the sorted service list that have not expired