Documentation ¶
Index ¶
Constants ¶
const ( // DefaultPort is the default port zipkin listens on, which zipkin implementations // expect. DefaultPort = 9411 // DefaultRoute is the default route zipkin uses, and zipkin implementations // expect. DefaultRoute = "/api/v1/spans" // DefaultShutdownTimeout is the max amount of time telegraf will wait // for the plugin to shutdown DefaultShutdownTimeout = 5 )
Variables ¶
var (
// DefaultNetwork is the network to listen on; use only in tests.
DefaultNetwork = "tcp"
)
Functions ¶
Types ¶
type Handler ¶
Handler represents a type which can register itself with a router for http routing, and a Recorder for trace data collection.
type LineProtocolConverter ¶
type LineProtocolConverter struct {
// contains filtered or unexported fields
}
LineProtocolConverter implements the Recorder interface; it is a type meant to encapsulate the storage of zipkin tracing data in telegraf as line protocol.
func NewLineProtocolConverter ¶
func NewLineProtocolConverter(acc telegraf.Accumulator) *LineProtocolConverter
NewLineProtocolConverter returns an instance of LineProtocolConverter that will add to the given telegraf.Accumulator
func (*LineProtocolConverter) Error ¶
func (l *LineProtocolConverter) Error(err error)
type Recorder ¶
Recorder represents a type which can record zipkin trace data as well as any accompanying errors, and process that data.
type SpanHandler ¶
type SpanHandler struct { Path string // contains filtered or unexported fields }
SpanHandler is an implementation of a Handler which accepts zipkin thrift span data and sends it to the recorder
func NewSpanHandler ¶
func NewSpanHandler(path string) *SpanHandler
NewSpanHandler returns a new server instance given path to handle
func (*SpanHandler) Register ¶
func (s *SpanHandler) Register(router *mux.Router, recorder Recorder) error
Register implements the Service interface. Register accepts zipkin thrift data POSTed to the path of the mux router
func (*SpanHandler) Spans ¶
func (s *SpanHandler) Spans(w http.ResponseWriter, r *http.Request)
Spans handles zipkin thrift spans
type Zipkin ¶
type Zipkin struct { ServiceAddress string Port int Path string Log telegraf.Logger // contains filtered or unexported fields }
Zipkin is a telegraf configuration structure for the zipkin input plugin, but it also contains fields for the management of a separate, concurrent zipkin http server
func (*Zipkin) Gather ¶
func (z *Zipkin) Gather(_ telegraf.Accumulator) error
Gather is empty for the zipkin plugin; all gathering is done through the separate goroutine launched in (*Zipkin).Start()
func (*Zipkin) Listen ¶
func (z *Zipkin) Listen(ln net.Listener, acc telegraf.Accumulator)
Listen creates an http server on the zipkin instance it is called with, and serves http until it is stopped by Zipkin's (*Zipkin).Stop() method.
func (*Zipkin) SampleConfig ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
thrift_serialize
A small cli utility meant to convert json to zipkin thrift binary format, and vice versa.
|
A small cli utility meant to convert json to zipkin thrift binary format, and vice versa. |