Documentation ¶
Index ¶
- Variables
- type ServiceOperationStorage
- type SpanReader
- func (s *SpanReader) FindTraceIDs(ctx context.Context, traceQuery *spanstore.TraceQueryParameters) ([]model.TraceID, error)
- func (s *SpanReader) FindTraces(ctx context.Context, traceQuery *spanstore.TraceQueryParameters) ([]*model.Trace, error)
- func (s *SpanReader) GetOperations(ctx context.Context, query spanstore.OperationQueryParameters) ([]spanstore.Operation, error)
- func (s *SpanReader) GetServices(ctx context.Context) ([]string, error)
- func (s *SpanReader) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error)
- type SpanReaderParams
- type SpanWriter
- type SpanWriterParams
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("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") // 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") )
Functions ¶
This section is empty.
Types ¶
type ServiceOperationStorage ¶
type ServiceOperationStorage struct {
// contains filtered or unexported fields
}
ServiceOperationStorage stores service to operation pairs.
func NewServiceOperationStorage ¶
func NewServiceOperationStorage( client es.Client, logger *zap.Logger, cacheTTL time.Duration, ) *ServiceOperationStorage
NewServiceOperationStorage returns a new ServiceOperationStorage.
type SpanReader ¶
type SpanReader struct {
// contains filtered or unexported fields
}
SpanReader can query for and load traces from ElasticSearch
func NewSpanReader ¶
func NewSpanReader(p SpanReaderParams) *SpanReader
NewSpanReader returns a new SpanReader with a metrics.
func (*SpanReader) FindTraceIDs ¶
func (s *SpanReader) FindTraceIDs(ctx context.Context, traceQuery *spanstore.TraceQueryParameters) ([]model.TraceID, error)
FindTraceIDs retrieves traces IDs that match the traceQuery
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, query spanstore.OperationQueryParameters, ) ([]spanstore.Operation, 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, ordered by frequency
type SpanReaderParams ¶
type SpanReaderParams struct { Client es.Client Logger *zap.Logger MaxSpanAge time.Duration MaxDocCount int MetricsFactory metrics.Factory IndexPrefix string SpanIndexDateLayout string ServiceIndexDateLayout string SpanIndexRolloverFrequency time.Duration ServiceIndexRolloverFrequency time.Duration TagDotReplacement string Archive bool UseReadWriteAliases bool RemoteReadClusters []string }
SpanReaderParams holds constructor params for NewSpanReader
type SpanWriter ¶
type SpanWriter struct {
// contains filtered or unexported fields
}
SpanWriter is a wrapper around elastic.Client
func NewSpanWriter ¶
func NewSpanWriter(p SpanWriterParams) *SpanWriter
NewSpanWriter creates a new SpanWriter for use
func (*SpanWriter) CreateTemplates ¶
func (s *SpanWriter) CreateTemplates(spanTemplate, serviceTemplate, indexPrefix string) error
CreateTemplates creates index templates.
type SpanWriterParams ¶
type SpanWriterParams struct { Client es.Client Logger *zap.Logger MetricsFactory metrics.Factory IndexPrefix string SpanIndexDateLayout string ServiceIndexDateLayout string AllTagsAsFields bool TagKeysAsFields []string TagDotReplacement string Archive bool UseReadWriteAliases bool ServiceCacheTTL time.Duration IndexCacheTTL time.Duration }
SpanWriterParams holds constructor parameters for NewSpanWriter