store

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 25 Imported by: 1

Documentation

Index

Constants

View Source
const (
	CompressParam         = "COMPRESS"
	InMemoryCapacityParam = "IN_MEMORY_CAPACITY"
	LogCountLimitParam    = "LOG_COUNT_LIMIT"
	DrainIntervalParam    = "DRAIN_INTERVAL"
)

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")

	// 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

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

func (*LogzioSpanReader) GetTrace

func (reader *LogzioSpanReader) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error)

GetTrace returns a Jaeger trace by traceID

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

func (*LogzioSpanWriter) WriteSpan

func (spanWriter *LogzioSpanWriter) WriteSpan(ctx context.Context, span *model.Span) error

WriteSpan receives a Jaeger span, converts it to logzio span and sends it to logzio

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) Close

func (store *Store) Close()

Close the span store

func (*Store) DependencyReader

func (store *Store) DependencyReader() dependencystore.Reader

DependencyReader return the created logzio dependency store

func (*Store) SpanReader

func (store *Store) SpanReader() spanstore.Reader

SpanReader returns the created logzio span reader

func (*Store) SpanWriter

func (store *Store) SpanWriter() spanstore.Writer

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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