Help us shape the future of Go! Take the 2026 Go Developer Survey

tracing

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExportedTrace

type ExportedTrace struct {
	ResourceSpans []struct {
		Resource struct {
			Attributes []struct {
				Key   string `json:"key"`
				Value struct {
					ArrayValue *struct {
						Values []struct {
							StringValue string `json:"stringValue"`
						} `json:"values"`
					} `json:"arrayValue,omitempty"`
					IntValue    *string `json:"intValue,omitempty"`
					StringValue *string `json:"stringValue,omitempty"`
				} `json:"value"`
			} `json:"attributes"`
		} `json:"resource"`
		SchemaURL  string `json:"schemaUrl"`
		ScopeSpans []struct {
			Scope struct {
				Name    string  `json:"name"`
				Version *string `json:"version,omitempty"`
			} `json:"scope"`
			Spans []struct {
				Attributes []struct {
					Key   string `json:"key"`
					Value struct {
						BoolValue   *bool   `json:"boolValue,omitempty"`
						IntValue    *string `json:"intValue,omitempty"`
						StringValue *string `json:"stringValue,omitempty"`
						ArrayValue  *struct {
							Values []struct {
								StringValue string `json:"stringValue"`
							} `json:"values"`
						} `json:"arrayValue,omitempty"`
					} `json:"value"`
				} `json:"attributes,omitempty"`
				EndTimeUnixNano   string `json:"endTimeUnixNano"`
				Flags             int    `json:"flags"`
				Kind              int    `json:"kind"`
				Name              string `json:"name"`
				ParentSpanID      string `json:"parentSpanId"`
				SpanID            string `json:"spanId"`
				StartTimeUnixNano string `json:"startTimeUnixNano"`
				Status            struct {
				} `json:"status"`
				TraceID string `json:"traceId"`
			} `json:"spans"`
		} `json:"scopeSpans"`
	} `json:"resourceSpans"`
}

type TraceAsserter added in v1.0.1

type TraceAsserter struct {
	// contains filtered or unexported fields
}

func NewTraceAsserter added in v1.0.1

func NewTraceAsserter(spans []trace.ReadOnlySpan) *TraceAsserter

func (*TraceAsserter) AssertAttributes added in v1.0.1

func (ta *TraceAsserter) AssertAttributes(attributes []attribute.KeyValue, expected map[string]string) error

func (*TraceAsserter) AssertSpan added in v1.0.1

func (ta *TraceAsserter) AssertSpan(name string, attributes map[string]string) error

func (*TraceAsserter) AssertSpans added in v1.0.1

func (ta *TraceAsserter) AssertSpans(spans map[string]map[string]string) error

func (*TraceAsserter) FilterTraceID added in v1.0.1

func (ta *TraceAsserter) FilterTraceID(traceID string)

func (*TraceAsserter) FindSpan added in v1.0.1

func (ta *TraceAsserter) FindSpan(name string) trace.ReadOnlySpan

Jump to

Keyboard shortcuts

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