plugin

package
v0.0.0-...-06b6adf Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

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

	// ErrDurationAndTagQueryNotSupported occurs when duration and tags are both set
	ErrDurationAndTagQueryNotSupported = errors.New("cannot query for duration and tags simultaneously")

	// ErrStartAndEndTimeNotSet occurs when start time and end time are not set
	ErrStartAndEndTimeNotSet = errors.New("start and End Time must be set")
)

Functions

func NewCouchbaseStore

func NewCouchbaseStore(options options.Options, logger hclog.Logger) (*couchbaseStore, error)

func OpenBucket

func OpenBucket(store Store, bucketName string, logger hclog.Logger) error

func VerifyAnalyticsSupported

func VerifyAnalyticsSupported(client httpclient.Client, connStr string, logger hclog.Logger) error

func VerifyServices

func VerifyServices(opts options.Options, httpClient httpclient.Client, conn string, store *couchbaseStore, logger hclog.Logger) error

Types

type Dependency

type Dependency struct {
	Deps []model.DependencyLink `json:"dependencies"`
	Ts   time.Time              `json:"ts"`
}

type Result

type Result interface {
	Next(valuePtr interface{}) bool
	Close() error
}

type Span

type Span struct {
	OperationName string           `json:"operation_name,omitempty"`
	References    []SpanRef        `json:"references"`
	Flags         model.Flags      `json:"flags"`
	StartTime     string           `json:"start_time"` // this is necessary until an analytics issue is closed out.
	Duration      time.Duration    `json:"duration"`
	Tags          []model.KeyValue `json:"tags"`
	Logs          []model.Log      `json:"logs"`
	Process       *model.Process   `json:"process,omitempty"`
	ProcessID     string           `json:"process_id,omitempty"`
	Warnings      []string         `json:"warnings,omitempty"`
	TraceID       TraceID          `json:"trace_id"`
	SpanID        uint64           `json:"span_id"`
	Type          string           `json:"type"`
	ProcessedTags []string         `json:"processed_tags"`
}

type SpanRef

type SpanRef struct {
	TraceID TraceID `json:"trace_id"`
	SpanID  uint64  `json:"span_id"`
	RefType int32   `json:"ref_type"`
}

type Store

type Store interface {
	UseAnalytics(use bool)
	Connect(bucketName string) error
	Query(query string, params interface{}) (Result, error)
	Insert(key string, value interface{}, expiry int) error
	Name() string
	SpanReader() spanstore.Reader
	SpanWriter() spanstore.Writer
	DependencyReader() dependencystore.Reader
}

type Tag

type Tag struct {
	Tag string `json:"tag"`
}

type TagInsertion

type TagInsertion struct {
	TagKey   string `json:"tag_key"`
	TagValue string `json:"tag_value"`
}

type TraceID

type TraceID struct {
	High uint64 `json:"hi"`
	Low  uint64 `json:"lo"`
}

type UniqueTraceIDs

type UniqueTraceIDs map[TraceID]struct{}

func (UniqueTraceIDs) Add

func (u UniqueTraceIDs) Add(traceID TraceID)

Add adds a traceID to the existing map

Jump to

Keyboard shortcuts

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