Documentation ¶
Index ¶
- Constants
- Variables
- type LogzioConfig
- type LogzioSpanReader
- func (reader *LogzioSpanReader) FindTraceIDs(ctx context.Context, query *spanstore.TraceQueryParameters) ([]model.TraceID, error)
- func (reader *LogzioSpanReader) FindTraces(ctx context.Context, query *spanstore.TraceQueryParameters) ([]*model.Trace, error)
- func (*LogzioSpanReader) GetDependencies(ctx context.Context, endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error)
- func (reader *LogzioSpanReader) GetOperations(ctx context.Context, query spanstore.OperationQueryParameters) ([]spanstore.Operation, error)
- func (reader *LogzioSpanReader) GetServices(ctx context.Context) ([]string, error)
- func (reader *LogzioSpanReader) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error)
- type LogzioSpanWriter
- type ServiceOperationStorage
- type Store
- type TraceFinder
Constants ¶
const ( CompressParam = "COMPRESS" InMemoryCapacityParam = "IN_MEMORY_CAPACITY" LogCountLimitParam = "LOG_COUNT_LIMIT" DrainIntervalParam = "DRAIN_INTERVAL" )
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 LogzioConfig ¶
type LogzioConfig struct { AccountToken string `yaml:"accountToken"` Region string `yaml:"region"` APIToken string `yaml:"apiToken"` CustomListenerURL string `yaml:"customListenerUrl"` CustomAPIURL string `yaml:"customAPIUrl"` CustomQueueDir string `yaml:"customQueueDir"` InMemoryQueue bool `yaml:"inMemoryQueue"` Compress bool `yaml:"compress"` InMemoryCapacity uint64 `yaml:"inMemoryCapacity"` LogCountLimit int `yaml:"logCountLimit"` DrainInterval int `yaml:"drainInterval"` }
LogzioConfig struct for logzio span store
func ParseConfig ¶
func ParseConfig(filePath string, logger hclog.Logger) (*LogzioConfig, error)
ParseConfig receives a config file path, parse it and returns logzio span store config
func (*LogzioConfig) APIURL ¶
func (config *LogzioConfig) APIURL() string
APIURL returns the constructed API URL to read spans from
func (*LogzioConfig) ListenerURL ¶
func (config *LogzioConfig) ListenerURL() string
ListenerURL returns the constructed listener URL to write spans to
func (*LogzioConfig) String ¶
func (config *LogzioConfig) String() string
type LogzioSpanReader ¶
type LogzioSpanReader struct {
// contains filtered or unexported fields
}
LogzioSpanReader is a struct which holds logzio span reader properties
func NewLogzioSpanReader ¶
func NewLogzioSpanReader(config LogzioConfig, logger hclog.Logger) *LogzioSpanReader
NewLogzioSpanReader creates a new logzio span reader
func (*LogzioSpanReader) FindTraceIDs ¶
func (reader *LogzioSpanReader) FindTraceIDs(ctx context.Context, query *spanstore.TraceQueryParameters) ([]model.TraceID, error)
FindTraceIDs retrieve traceIDs that match the traceQuery
func (*LogzioSpanReader) FindTraces ¶
func (reader *LogzioSpanReader) FindTraces(ctx context.Context, query *spanstore.TraceQueryParameters) ([]*model.Trace, error)
FindTraces return an array of Jaeger traces by a search query
func (*LogzioSpanReader) GetDependencies ¶
func (*LogzioSpanReader) GetDependencies(ctx context.Context, endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error)
GetDependencies returns an array of all the dependencies in a specific time range
func (*LogzioSpanReader) GetOperations ¶
func (reader *LogzioSpanReader) GetOperations(ctx context.Context, query spanstore.OperationQueryParameters) ([]spanstore.Operation, error)
GetOperations returns an array of all the operations a specific service performed
func (*LogzioSpanReader) GetServices ¶
func (reader *LogzioSpanReader) GetServices(ctx context.Context) ([]string, error)
GetServices returns an array of all the service names that are being monitored
type LogzioSpanWriter ¶
type LogzioSpanWriter struct {
// contains filtered or unexported fields
}
LogzioSpanWriter is a struct which holds logzio span writer properties
func NewLogzioSpanWriter ¶
func NewLogzioSpanWriter(config LogzioConfig, logger hclog.Logger) (*LogzioSpanWriter, error)
NewLogzioSpanWriter creates a new logzio span writer for jaeger
func (*LogzioSpanWriter) Close ¶
func (spanWriter *LogzioSpanWriter) Close()
Close stops and drains logzio sender
type ServiceOperationStorage ¶
type ServiceOperationStorage struct {
// contains filtered or unexported fields
}
ServiceOperationStorage stores service to operation pairs.
func NewServiceOperationStorage ¶
func NewServiceOperationStorage(reader *LogzioSpanReader) *ServiceOperationStorage
NewServiceOperationStorage returns a new ServiceOperationStorage.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is span store struct for logzio jaeger span storage
func NewLogzioStore ¶
func NewLogzioStore(config LogzioConfig, logger hclog.Logger) *Store
NewLogzioStore creates a new logzio span store for jaeger
func (*Store) DependencyReader ¶
func (store *Store) DependencyReader() dependencystore.Reader
DependencyReader return the created logzio dependency store
func (*Store) SpanReader ¶
SpanReader returns the created logzio span reader
func (*Store) SpanWriter ¶
SpanWriter returns the created logzio span writer
type TraceFinder ¶
type TraceFinder struct {
// contains filtered or unexported fields
}
TraceFinder object builds search request from traceIDs and parse the result to traces
func NewTraceFinder ¶
func NewTraceFinder(reader *LogzioSpanReader) TraceFinder
NewTraceFinder creates trace finder object