trace

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	// Name is the name of this event
	Name string

	// Attributes contains a list of key-value pairs.
	Attributes []label.KeyValue

	// Time is the time at which this event was recorded.
	Time time.Time
}

Event is used to describe an Event with a message string and set of Attributes.

type SpanBatcher

type SpanBatcher interface {
	ExportSpans(context.Context, []*SpanData)
}

SpanBatcher is a type for functions that receive batched of sampled trace spans.

The ExportSpans method is called asynchronously. However its should not take forever to process the spans.

The SpanData should not be modified.

type SpanData

type SpanData struct {
	SpanContext  apitrace.SpanContext
	ParentSpanID apitrace.SpanID
	SpanKind     apitrace.SpanKind
	Name         string
	StartTime    time.Time
	// The wall clock time of EndTime will be adjusted to always be offset
	// from StartTime by the duration of the span.
	EndTime                  time.Time
	Attributes               []label.KeyValue
	MessageEvents            []Event
	Links                    []apitrace.Link
	StatusCode               codes.Code
	StatusMessage            string
	HasRemoteParent          bool
	DroppedAttributeCount    int
	DroppedMessageEventCount int
	DroppedLinkCount         int

	// ChildSpanCount holds the number of child span created for this span.
	ChildSpanCount int

	// Resource contains attributes representing an entity that produced this span.
	Resource *resource.Resource

	// InstrumentationLibrary defines the instrumentation library used to
	// providing instrumentation.
	InstrumentationLibrary instrumentation.Library
}

SpanData contains all the information collected by a span.

type SpanSyncer

type SpanSyncer interface {
	ExportSpan(context.Context, *SpanData)
}

SpanSyncer is a type for functions that receive a single sampled trace span.

The ExportSpan method is called synchronously. Therefore, it should not take forever to process the span.

The SpanData should not be modified.

Directories

Path Synopsis
tracetest is a testing helper package for the SDK.
tracetest is a testing helper package for the SDK.

Jump to

Keyboard shortcuts

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