exporters

package
v0.0.0-...-3e52749 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToProvider

func ConnectToProvider(exporters ...tracing.Forwarder)

ConnectToProvider configures one or more exporters into our trace provider, and sets that as the global tracer.

func NameToWriter

func NameToWriter(name string) (io.Writer, error)

NameToWriter converts a file name, or 'stdout' into an active IO.Writer

Types

type ExportProcessor

type ExportProcessor interface {
	// Open establishes the target sink to use.  The type is specific to a
	// given forwarder.  The actual connection to the target sink may be
	// deferred, so long as Open is sufficient to ensure that it can be
	// eventually established.
	Open(attrs interface{}) error

	// Close terminates the connection to a target sink.
	Close()

	// Forward sends the supplied entry to the target sink.  This is called
	// in a worker goroutine.  'early' is set to true if the entry arrived
	// prior to the Open operation.
	Forward(entry *pbl.Entry, early bool) error

	// Process the span to store, or nil it should be ignored.
	Process(data *api.SpanData) *api.SpanData

	// ProcessDetail returns the supplied detail, as it should be stored, or
	// nil  if it should be removed.
	ProcessDetail(data *api.Detail) *api.Detail
}

type Exporter

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

Exporter defines the base span exporter implementation

func NewExporter

func NewExporter(proc ExportProcessor) *Exporter

NewExporter creates a new span exporter instance with the specified forwarded.

func (*Exporter) Close

func (e *Exporter) Close()

Close gracefully terminates the connection to the sink, after allowing all previously buffered spans to be forwarded

func (*Exporter) Export

func (e *Exporter) Export(data *api.SpanData)

Export sends a completed span to be forwarded to the sink.

func (*Exporter) Open

func (e *Exporter) Open(attrs interface{}) error

Open establishes the connection to the sink, and starts the worker flush process

type IOWForwarder

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

IOWForwarder implements a Forwarder to a designated IO writer. The output is formatted into a functional tree, grouped by trace ID.

func NewIOWForwarder

func NewIOWForwarder() *IOWForwarder

NewIOWForwarder creates a closed IOwForwarder instance

func (*IOWForwarder) Close

func (iow *IOWForwarder) Close()

Close detaches the forwarder from the active IO.Writer

func (*IOWForwarder) Forward

func (iow *IOWForwarder) Forward(entry *pbl.Entry, _ bool) error

Forward emits the log entries to the IO.Writer channel in functional order, grouped by trace ID

func (*IOWForwarder) Open

func (iow *IOWForwarder) Open(attrs interface{}) error

Open connects the forwarder to the supplied IO.Writer

func (*IOWForwarder) Process

func (iow *IOWForwarder) Process(span *tracing.SpanData) *tracing.SpanData

func (*IOWForwarder) ProcessDetail

func (iow *IOWForwarder) ProcessDetail(data *tracing.Detail) *tracing.Detail

type SinkForwarder

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

SinkForwarder implements a forwarder to the Cloud Chamber trace sink service

func NewSinkForwarder

func NewSinkForwarder(dialOptions ...grpc.DialOption) *SinkForwarder

NewSinkForwarder creates a new, closed, forwarder instance.

func (*SinkForwarder) Close

func (sf *SinkForwarder) Close()

Close detaches from the trace sink service

func (*SinkForwarder) Forward

func (sf *SinkForwarder) Forward(entry *pbl.Entry, early bool) error

Forward emits the log entries to the trace sink service. It automatically handles reconnecting when there is an error while forwarding an entry.

func (*SinkForwarder) Open

func (sf *SinkForwarder) Open(attrs interface{}) error

Open supplies the endpoint information to be able to connect to the trace sink service.

func (*SinkForwarder) Process

func (sf *SinkForwarder) Process(data *tracing.SpanData) *tracing.SpanData

func (*SinkForwarder) ProcessDetail

func (sf *SinkForwarder) ProcessDetail(data *tracing.Detail) *tracing.Detail

type UTForwarder

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

UTForwarder implements span entry forwarding to the test context logger

func NewUTForwarder

func NewUTForwarder() *UTForwarder

NewUTForwarder creates a new instance, with no active test context

func (*UTForwarder) Close

func (utf *UTForwarder) Close()

Close disconnects from the test context

func (*UTForwarder) Forward

func (utf *UTForwarder) Forward(entry *pbl.Entry, early bool) error

Forward emits the formatted log entry into the test context

func (*UTForwarder) Open

func (utf *UTForwarder) Open(attrs interface{}) error

Open establishes a connection to active test context

func (*UTForwarder) Process

func (utf *UTForwarder) Process(span *tracing.SpanData) *tracing.SpanData

func (*UTForwarder) ProcessDetail

func (utf *UTForwarder) ProcessDetail(data *tracing.Detail) *tracing.Detail

Jump to

Keyboard shortcuts

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