tracer

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitOpenTelemetry added in v0.10.25

func InitOpenTelemetry(exporter sdktrace.SpanExporter) trace.Tracer

Types

type SpanCollector added in v0.10.25

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

SpanCollector does 3 things: 1) Accepts spans from OpenTelemetry. 2) Stores spans (for now, in memory) 3) Allows consumers to read spans they might want to send elsewhere Numbers 2 and 3 access the same data, and so it's a concurrency issue.

func NewSpanCollector added in v0.10.25

func NewSpanCollector(ctx context.Context) *SpanCollector

func (*SpanCollector) Close added in v0.10.25

func (c *SpanCollector) Close() error

func (*SpanCollector) ExportSpans added in v0.22.10

func (c *SpanCollector) ExportSpans(ctx context.Context, spans []*trace.SpanSnapshot) error

func (*SpanCollector) GetOutgoingSpans added in v0.10.25

func (c *SpanCollector) GetOutgoingSpans() (io.Reader, func(), error)

SpanSource

func (*SpanCollector) Shutdown added in v0.10.25

func (c *SpanCollector) Shutdown(ctx context.Context) error

type SpanSource added in v0.10.25

type SpanSource interface {
	// GetOutgoingSpans gives a consumer access to spans they should send
	// If there are no outgoing spans, err will be io.EOF
	// rejectFn allows client to reject spans, so they can be requeued
	// rejectFn must be called, if at all, before the next call to GetOutgoingSpans
	GetOutgoingSpans() (data io.Reader, rejectFn func(), err error)

	// Close closes the SpanSource; the client may not interact with this SpanSource after calling Close
	Close() error
}

SpanSource is the interface for consumers (generally telemetry.Controller)

Directories

Path Synopsis
Package exptel is a fork of core Span types from opentelemetry-go v0.2.0.
Package exptel is a fork of core Span types from opentelemetry-go v0.2.0.

Jump to

Keyboard shortcuts

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