flow

package
v0.0.0-...-168b963 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2016 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package flow processes gotocol context information to collect and export request flows across the system

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnnotateReceive

func AnnotateReceive(msg gotocol.Message, name string, received time.Time)

AnnotateReceive service activity when receiving a message

func AnnotateSend

func AnnotateSend(msg gotocol.Message, name string)

AnnotateSend service sends on a flow

func End

func End(msg gotocol.Message, resphist, servhist, rthist *generic.Histogram)

End a flow, flushing output and freeing the request id to keep the map smaller

func Flush

func Flush(t gotocol.TraceContextType, trace []*spannotype)

Flush the spans for a request in zipkin format

func Instrument

func Instrument(msg gotocol.Message, name string, hist *generic.Histogram)

Instrument common code for requests

func Shutdown

func Shutdown()

Shutdown the flow mapping system and flush remaining flows

func WriteZip

func WriteZip(zip zipkinspan)

WriteZip stores zipkin as json

Types

type ByCtx

type ByCtx []*spannotype

ByCtx sortable spans

func (ByCtx) Len

func (a ByCtx) Len() int

func (ByCtx) Less

func (a ByCtx) Less(i, j int) bool

func (ByCtx) Swap

func (a ByCtx) Swap(i, j int)

type KafkaCollector

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

KafkaCollector implements Collector by publishing spans to a Kafka broker.

func NewKafkaCollector

func NewKafkaCollector(addrs []string) (*KafkaCollector, error)

NewKafkaCollector returns a new Kafka-backed Collector. addrs should be a slice of TCP endpoints of the form "host:port".

func (*KafkaCollector) Close

func (c *KafkaCollector) Close() error

Close implements Collector.

func (*KafkaCollector) Collect

func (c *KafkaCollector) Collect(s []byte)

Collect implements Collector.

type Values

type Values int

Values for zipkin span direction

const (
	CS      Values = iota // client send
	SR                    // server receive
	SS                    // server send
	CR                    // client receive
	Unknown               // something went wrong
)

Zipkin annotation tags

func (Values) String

func (v Values) String() string

pretty printer for Values

Jump to

Keyboard shortcuts

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