traceio

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Trace attribute keys for various Service Weaver identifiers. These
	// are attached to all exported traces by the weavelet, and displayed
	// in the UI by the Service Weaver visualization tools (e.g., dashboard).
	AppNameTraceKey             = attribute.Key("serviceweaver.app")
	VersionTraceKey             = attribute.Key("serviceweaver.version")
	ColocationGroupNameTraceKey = attribute.Key("serviceweaver.coloc_group")
	GroupReplicaIDTraceKey      = attribute.Key("serviceweaver.group_replica_id")
)

Variables

This section is empty.

Functions

func TestTracer

func TestTracer() trace.Tracer

TestTracer returns a simple tracer suitable for tests.

Types

type ReadSpan

type ReadSpan struct {
	sdk.ReadOnlySpan
	Span *protos.Span
}

ReadSpan is a wrapper around a Span that implements the sdk.ReadOnlySpan interface.

func (*ReadSpan) Attributes

func (s *ReadSpan) Attributes() []attribute.KeyValue

func (*ReadSpan) ChildSpanCount

func (s *ReadSpan) ChildSpanCount() int

func (*ReadSpan) DroppedAttributes

func (s *ReadSpan) DroppedAttributes() int

func (*ReadSpan) DroppedEvents

func (s *ReadSpan) DroppedEvents() int
func (s *ReadSpan) DroppedLinks() int

func (*ReadSpan) EndTime

func (s *ReadSpan) EndTime() time.Time

func (*ReadSpan) Events

func (s *ReadSpan) Events() []sdk.Event

func (*ReadSpan) InstrumentationLibrary

func (s *ReadSpan) InstrumentationLibrary() instrumentation.Scope
func (s *ReadSpan) Links() []sdk.Link

func (*ReadSpan) Name

func (s *ReadSpan) Name() string

func (*ReadSpan) Parent

func (s *ReadSpan) Parent() trace.SpanContext

func (*ReadSpan) Resource

func (s *ReadSpan) Resource() *resource.Resource

func (*ReadSpan) SpanContext

func (s *ReadSpan) SpanContext() trace.SpanContext

func (*ReadSpan) SpanKind

func (s *ReadSpan) SpanKind() trace.SpanKind

func (*ReadSpan) StartTime

func (s *ReadSpan) StartTime() time.Time

func (*ReadSpan) Status

func (s *ReadSpan) Status() sdk.Status

type Writer

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

Writer writes a sequence of trace spans to a specified export function.

func NewWriter

func NewWriter(export func(spans *protos.TraceSpans) error) *Writer

NewWriter creates a Writer that writes a sequence of trace spans to a specified export function.

func (*Writer) ExportSpans

func (w *Writer) ExportSpans(_ context.Context, spans []sdk.ReadOnlySpan) error

ExportSpans implements the sdk.SpanExporter interface.

func (*Writer) Shutdown

func (w *Writer) Shutdown(_ context.Context) error

Shutdown implements the sdk.SpanExporter interface.

Jump to

Keyboard shortcuts

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