ptracetest

package
v0.112.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareResourceSpans

func CompareResourceSpans(expected, actual ptrace.ResourceSpans) error

CompareResourceSpans compares each part of two given ResourceSpans and returns an error if they don't match. The error describes what didn't match.

func CompareScopeSpans

func CompareScopeSpans(expected, actual ptrace.ScopeSpans) error

CompareScopeSpans compares each part of two given SpanSlices and returns an error if they don't match. The error describes what didn't match.

func CompareSpan

func CompareSpan(expected, actual ptrace.Span) error

CompareSpan compares each part of two given Span and returns an error if they don't match. The error describes what didn't match.

func CompareSpanEvent added in v0.71.0

func CompareSpanEvent(expected, actual ptrace.SpanEvent) error

CompareSpanEvent compares each part of two given SpanEvent and returns an error if they don't match. The error describes what didn't match.

func CompareSpanLink(expected, actual ptrace.SpanLink) error

CompareSpanLink compares each part of two given SpanLink and returns an error if they don't match. The error describes what didn't match.

func CompareTraces

func CompareTraces(expected, actual ptrace.Traces, options ...CompareTracesOption) error

CompareTraces compares each part of two given Traces and returns an error if they don't match. The error describes what didn't match.

Types

type CompareTracesOption

type CompareTracesOption interface {
	// contains filtered or unexported methods
}

CompareTracesOption can be used to mutate expected and/or actual traces before comparing.

func IgnoreEndTimestamp added in v0.88.0

func IgnoreEndTimestamp() CompareTracesOption

IgnoreEndTimestamp is a CompareTracesOption that clears EndTimestamp fields on all spans.

func IgnoreResourceAttributeValue

func IgnoreResourceAttributeValue(attributeName string) CompareTracesOption

IgnoreResourceAttributeValue is a CompareTracesOption that removes a resource attribute from all resources.

func IgnoreResourceSpansOrder

func IgnoreResourceSpansOrder() CompareTracesOption

IgnoreResourceSpansOrder is a CompareTracesOption that ignores the order of resource traces/metrics/logs.

func IgnoreScopeSpanInstrumentationScopeAttributeValue added in v0.100.0

func IgnoreScopeSpanInstrumentationScopeAttributeValue(attributeName string) CompareTracesOption

IgnoreScopeSpanInstrumentationScopeAttributeValue is a CompareTracesOption that clears value of the scope span instrumentation scope name.

func IgnoreScopeSpanInstrumentationScopeName added in v0.100.0

func IgnoreScopeSpanInstrumentationScopeName() CompareTracesOption

IgnoreScopeSpanInstrumentationScopeName is a CompareTracesOption that clears value of the scope span instrumentation scope name.

func IgnoreScopeSpanInstrumentationScopeVersion added in v0.100.0

func IgnoreScopeSpanInstrumentationScopeVersion() CompareTracesOption

IgnoreScopeSpanInstrumentationScopeVersion is a CompareTracesOption that clears value of the scope span instrumentation scope version.

func IgnoreScopeSpansOrder

func IgnoreScopeSpansOrder() CompareTracesOption

IgnoreScopeSpansOrder is a CompareTracesOption that ignores the order of instrumentation scope traces/metrics/logs.

func IgnoreSpanAttributeValue added in v0.88.0

func IgnoreSpanAttributeValue(attributeName string) CompareTracesOption

IgnoreSpanAttributeValue is a CompareTracesOption that clears value of the span attribute.

func IgnoreSpanID added in v0.88.0

func IgnoreSpanID() CompareTracesOption

IgnoreSpanID is a CompareTracesOption that clears SpanID fields on all spans.

func IgnoreSpansOrder

func IgnoreSpansOrder() CompareTracesOption

IgnoreSpansOrder is a CompareTracesOption that ignores the order of spans.

func IgnoreStartTimestamp added in v0.88.0

func IgnoreStartTimestamp() CompareTracesOption

IgnoreStartTimestamp is a CompareTracesOption that clears StartTimestamp fields on all spans.

func IgnoreTraceID added in v0.88.0

func IgnoreTraceID() CompareTracesOption

IgnoreTraceID is a CompareTracesOption that clears TraceID fields on all spans.

Jump to

Keyboard shortcuts

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