tracing

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: May 4, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ComponentTag 跟踪组件标签
	ComponentTag = opentracing.Tag{Key: string(ext.Component), Value: "gRPC"}
)

Functions

func OpenTracingClientInterceptor

func OpenTracingClientInterceptor(tracer opentracing.Tracer) grpc.UnaryClientInterceptor

OpenTracingClientInterceptor 重写客户端解析器(透传数据traceId等)

func OpentracingServerInterceptor

func OpentracingServerInterceptor(tracer opentracing.Tracer) grpc.UnaryServerInterceptor

OpentracingServerInterceptor opentracing的服务端解析器(透传数据traceId等)

Types

type MDReaderWriter

type MDReaderWriter struct {
	metadata.MD
}

MDReaderWriter 读取元数据

func (MDReaderWriter) ForeachKey

func (c MDReaderWriter) ForeachKey(handler func(key, val string) error) error

ForeachKey 遍历所有的key并调用handler

func (MDReaderWriter) Set

func (c MDReaderWriter) Set(key, val string)

Set 设置key和val 到元数据中

Jump to

Keyboard shortcuts

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