zipkin

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: Apache-2.0 Imports: 24 Imported by: 3

Documentation

Index

Constants

View Source
const (
	ZipkinKafkaReport string = "kafka"
	ZipkinHttpReport  string = "http"
)
View Source
const (
	NoopSpanTraceID  = "-1"
	NoopSpanID       = "0"
	NoopSpanParentID = "-1"
)
View Source
const (
	DriverName = "Zipkin"
)

Variables

View Source
var NoopSpan = noopSpan{}

Functions

func HttpReporterBuilder

func HttpReporterBuilder(cfg ZipkinTraceConfig) (reporter.Reporter, error)

func KafkaReporterBuilder

func KafkaReporterBuilder(cfg ZipkinTraceConfig) (reporter.Reporter, error)

func NewHttpTracer

func NewHttpTracer(config map[string]interface{}) (api.Tracer, error)

func NewZipkinDriverImpl

func NewZipkinDriverImpl() *zipkinDriver

func ParseHostPort

func ParseHostPort(hostPort string) (string, uint16, error)

ParseHostPort parse ip, port from string host

Types

type HttpReportConfig

type HttpReportConfig struct {
	Timeout       int `json:"timeout"`
	BatchSize     int `json:"batch_size"`
	BatchInterval int `json:"batch_interval"`
}

type KafkaReportConfig

type KafkaReportConfig struct {
	Topic string `json:"topic"`
}

type ReporterBuilder

type ReporterBuilder func(ZipkinTraceConfig) (reporter.Reporter, error)

func GetReportBuilder

func GetReportBuilder(typ string) (ReporterBuilder, bool)

type SpanTag

type SpanTag uint64
const (
	ServiceName SpanTag = iota
	MethodName
	PROTOCOL
	ResultStatus
	RequestSize
	ResponseSize
	DownsteamHostAddress
	UpstreamHostAddress
	CallerAppName //caller
	CalleeAppName //remote app
)

func (SpanTag) String

func (s SpanTag) String() string

type ZipkinTraceConfig

type ZipkinTraceConfig struct {
	ServiceName string             `json:"service_name"`
	Reporter    string             `json:"reporter"`
	SampleRate  float64            `json:"sample_rate"`
	Addresses   []string           `json:"addresses"`
	HttpConfig  *HttpReportConfig  `json:"http"`
	KafkaConfig *KafkaReportConfig `json:"kafka"`
}

func (*ZipkinTraceConfig) ValidateZipkinConfig

func (z *ZipkinTraceConfig) ValidateZipkinConfig() (bool, error)

Jump to

Keyboard shortcuts

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