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, service string) ([]string, 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") )
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 ¶
NewCacheStore returns initialized CacheStore for badger use
func (*CacheStore) GetOperations ¶
func (c *CacheStore) GetOperations(service string) ([]string, error)
GetOperations returns all operations for a specific service 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 string, operation string)
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, storageCloser io.Closer) *SpanWriter
NewSpanWriter returns a SpawnWriter with cache
func (*SpanWriter) Close ¶
func (w *SpanWriter) Close() error
Close Implements io.Closer and closes the underlying storage
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 ¶
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