Documentation ¶
Index ¶
- func ConnectToProvider(exporters ...tracing.Forwarder)
- func NameToWriter(name string) (io.Writer, error)
- type ExportProcessor
- type Exporter
- type IOWForwarder
- func (iow *IOWForwarder) Close()
- func (iow *IOWForwarder) Forward(entry *pbl.Entry, _ bool) error
- func (iow *IOWForwarder) Open(attrs interface{}) error
- func (iow *IOWForwarder) Process(span *tracing.SpanData) *tracing.SpanData
- func (iow *IOWForwarder) ProcessDetail(data *tracing.Detail) *tracing.Detail
- type SinkForwarder
- func (sf *SinkForwarder) Close()
- func (sf *SinkForwarder) Forward(entry *pbl.Entry, early bool) error
- func (sf *SinkForwarder) Open(attrs interface{}) error
- func (sf *SinkForwarder) Process(data *tracing.SpanData) *tracing.SpanData
- func (sf *SinkForwarder) ProcessDetail(data *tracing.Detail) *tracing.Detail
- type UTForwarder
- func (utf *UTForwarder) Close()
- func (utf *UTForwarder) Forward(entry *pbl.Entry, early bool) error
- func (utf *UTForwarder) Open(attrs interface{}) error
- func (utf *UTForwarder) Process(span *tracing.SpanData) *tracing.SpanData
- func (utf *UTForwarder) ProcessDetail(data *tracing.Detail) *tracing.Detail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectToProvider ¶
ConnectToProvider configures one or more exporters into our trace provider, and sets that as the global tracer.
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
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) 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