transport

package
v2.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package transport defines various transports that can be used with RemoteReporter to send spans out of process. Transport is responsible for serializing the spans into a specific format suitable for sending to the tracing backend. Examples may include Thrift over UDP, Thrift or JSON over HTTP, Thrift over Kafka, etc.

Implementations are NOT required to be thread-safe; the RemoteReporter is expected to only call methods on the Transport from the same go-routine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Transport

type Transport interface {
	// Append converts the span to the wire representation and adds it
	// to sender's internal buffer.  If the buffer exceeds its designated
	// size, the transport should call Flush() and return the number of spans
	// flushed, otherwise return 0. If error is returned, the returned number
	// of spans is treated as failed span, and reported to metrics accordingly.
	Append(span *zipkincore.Span) (int, error)

	// Flush submits the internal buffer to the remote server. It returns the
	// number of spans flushed. If error is returned, the returned number of
	// spans is treated as failed span, and reported to metrics accordingly.
	Flush() (int, error)

	io.Closer
}

Transport abstracts the method of sending spans out of process. Implementations are NOT required to be thread-safe; the RemoteReporter is expected to only call methods on the Transport from the same go-routine.

Directories

Path Synopsis
Package zipkin provides various Transports that can be used with RemoteReporter for submitting traces to Zipkin backend.
Package zipkin provides various Transports that can be used with RemoteReporter for submitting traces to Zipkin backend.

Jump to

Keyboard shortcuts

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