xopoteltest

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CompareAttributes = makeListCompare(makeAttributesIndex, CompareAttribute)
View Source
var CompareEvents = makeListCompare(makeEventMap, CompareEvent)
View Source
var CompareLinks = makeListCompare(makeLinkMap, CompareLink)
View Source
var CompareSpanStubSlice = makeListCompare(makeSpanSubIndex, CompareSpanStub)

Functions

This section is empty.

Types

type Diff

type Diff struct {
	Path []string
	A    any
	B    any
}

func Compare

func Compare[T comparable](name string, a T, b T) []Diff

func CompareAny

func CompareAny(name string, a reflect.Value, b reflect.Value) []Diff

func CompareAttribute

func CompareAttribute(name string, a attribute.KeyValue, b attribute.KeyValue) []Diff

func CompareEvent

func CompareEvent(name string, a sdktrace.Event, b sdktrace.Event) []Diff

func CompareInterface

func CompareInterface(name string, a any, b any) []Diff
func CompareLink(name string, a Link, b Link) []Diff

func CompareMap

func CompareMap[K comparable, V any](name string, aMap map[K]V, bMap map[K]V, compare func(string, V, V) []Diff) []Diff

func CompareSlice

func CompareSlice[T comparable](name string, a []T, b []T) []Diff

func CompareSpanContext

func CompareSpanContext(name string, a SpanContext, b SpanContext) []Diff

func CompareSpanStub

func CompareSpanStub(name string, a SpanStub, b SpanStub) []Diff

func CompareStatus

func CompareStatus(name string, a sdktrace.Status, b sdktrace.Status) []Diff

func CompareTime

func CompareTime(name string, a time.Time, b time.Time) []Diff

func (Diff) MatchTail

func (d Diff) MatchTail(tail ...string) bool

func (Diff) String

func (d Diff) String() string
type Link struct {
	SpanContext           SpanContext
	Attributes            []attribute.KeyValue
	DroppedAttributeCount int
}

Link copied from https://pkg.go.dev/go.opentelemetry.io/otel/trace#Link because it doesn't implement UnmarshalJSON. Why not?

type SpanContext

type SpanContext struct {
	oteltrace.SpanContext
}

SpanContext copied from https://github.com/open-telemetry/opentelemetry-go/blob/2e54fbb3fede5b54f316b3a08eab236febd854e0/trace/trace.go#L290 because it doesn't implement UnmarshalJSON. Why not?

func (SpanContext) String

func (sc SpanContext) String() string

func (*SpanContext) UnmarshalJSON

func (sc *SpanContext) UnmarshalJSON(i []byte) error

type SpanID

type SpanID struct {
	oteltrace.SpanID
}

SpanID exists because oteltrace.SpanID doesn't implement UnmarshalJSON

func (*SpanID) UnmarshalText

func (s *SpanID) UnmarshalText(h []byte) error

type SpanStub

type SpanStub struct {
	Name              string
	SpanContext       SpanContext
	Parent            SpanContext
	SpanKind          oteltrace.SpanKind
	StartTime         time.Time
	EndTime           time.Time
	Attributes        []attribute.KeyValue
	Events            []sdktrace.Event
	Links             []Link
	Status            sdktrace.Status
	DroppedAttributes int
	DroppedEvents     int
	DroppedLinks      int
	ChildSpanCount    int
	Resource          any
	Scope             instrumentation.Scope `json:"InstrumentationLibrary"`
}

SpanStub from https://pkg.go.dev/go.opentelemetry.io/otel/sdk@v1.14.0/trace/tracetest#SpanStub because it doesn't implement UnmarshalJSON. Why not?

func (SpanStub) String

func (s SpanStub) String() string

type TraceFlags

type TraceFlags struct {
	oteltrace.TraceFlags
}

func (*TraceFlags) UnmarshalText

func (tf *TraceFlags) UnmarshalText(h []byte) error

type TraceID

type TraceID struct {
	oteltrace.TraceID
}

TraceID exists because oteltrace.TraceID doesn't implement UnmarshalJSON

func (*TraceID) UnmarshalText

func (t *TraceID) UnmarshalText(h []byte) error

type TraceState

type TraceState struct {
	oteltrace.TraceState
}

func (*TraceState) UnmarshalText

func (ts *TraceState) UnmarshalText(i []byte) error

Jump to

Keyboard shortcuts

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