tracer

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 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(ctx context.Context, exporter sdktrace.SpanProcessor) (apitrace.Tracer, error)

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) GetOutgoingSpans added in v0.10.25

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

SpanSource

func (*SpanCollector) OnEnd added in v0.10.25

func (c *SpanCollector) OnEnd(sd *exporttrace.SpanData)

func (*SpanCollector) OnStart added in v0.10.25

func (c *SpanCollector) OnStart(sd *exporttrace.SpanData)

OpenTelemetry exporter methods

func (*SpanCollector) Shutdown added in v0.10.25

func (c *SpanCollector) Shutdown()

type SpanSource added in v0.10.25

type SpanSource interface {
	// GetOutgoingSpans gives a consumer access to spans they should send
	// If there are no outoing 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)

Jump to

Keyboard shortcuts

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