flow

package
v0.0.0-...-f0bd5fd Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: Apache-2.0 Imports: 15 Imported by: 11

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 Add2Buffer

func Add2Buffer(msg gotocol.Message)

func AnnotateReceive

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

AnnotateReceive service activity when receiving a message

func AnnotateSend

func AnnotateSend(msg gotocol.Message, name string, tag_symbol 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 Endless_clear

func Endless_clear()

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, tag_symbol string)

Instrument common code for requests

func Interval_save

func Interval_save()

kafka arch don't set,so we can't collect flow metrics during running 这种方法的bug,当出现Delete类型的错误时,无法抓到路径上经过Delete节点的所有trace

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