jaeger

package
v1.8.8 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package jaeger provides some convenience data structures for integration testing. Disable some linting, as this is just a test class where readability is preferred to performance nolint:gocritic

Index

Constants

View Source
const (
	ErrTypeMissing = ErrType(iota)
	ErrTypeNotEqual
	ErrTypeNotMatching
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DiffResult added in v0.3.0

type DiffResult []TagDiff

func Diff added in v0.3.0

func Diff(expected, actual []Tag) DiffResult

func DiffAsRegexp added in v1.1.0

func DiffAsRegexp(expected, actual []Tag) DiffResult

DiffAsRegexp works like Diff but it matches the expected tags values as regular expressions when type is "String"

func (DiffResult) String added in v0.3.0

func (mr DiffResult) String() string

type ErrType added in v0.3.0

type ErrType int

type Process

type Process struct {
	ServiceName string `json:"serviceName"`
	Tags        []Tag  `json:"tags"`
}

type Reference

type Reference struct {
	RefType string `json:"refType"`
	TraceID string `json:"traceID"`
	SpanID  string `json:"spanID"`
}

type Span

type Span struct {
	TraceID       string      `json:"traceID"`
	SpanID        string      `json:"spanID"`
	OperationName string      `json:"operationName"`
	References    []Reference `json:"references"`
	StartTime     int64       `json:"startTime"`
	Duration      int64       `json:"duration"`
	Tags          []Tag       `json:"tags"`
	ProcessID     string      `json:"processID"`
}

func (*Span) Diff added in v0.3.0

func (s *Span) Diff(expected ...Tag) DiffResult

func (*Span) DiffAsRegexp added in v1.1.0

func (s *Span) DiffAsRegexp(expected ...Tag) DiffResult

DiffAsRegexp works like Diff but it matches the expected tags values as regular expressions

type Tag

type Tag struct {
	Key   string      `json:"key"`
	Type  string      `json:"type"`
	Value interface{} `json:"value"`
}

func FindIn added in v0.4.2

func FindIn(tags []Tag, key string) (Tag, bool)

type TagDiff added in v0.3.0

type TagDiff struct {
	ErrType  ErrType
	Expected Tag
	Actual   Tag
}

type Trace

type Trace struct {
	TraceID   string             `json:"traceID"`
	Spans     []Span             `json:"spans"`
	Processes map[string]Process `json:"processes"`
}

func (*Trace) ChildrenOf

func (t *Trace) ChildrenOf(parentID string) []Span

func (*Trace) FindByOperationName

func (t *Trace) FindByOperationName(operationName string) []Span

func (*Trace) ParentOf

func (t *Trace) ParentOf(s *Span) (Span, bool)

type TracesQuery

type TracesQuery struct {
	Data []Trace `json:"data"`
}

func (*TracesQuery) FindBySpan

func (tq *TracesQuery) FindBySpan(tags ...Tag) []Trace

Jump to

Keyboard shortcuts

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