Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TracingComponentTag tags TracingComponentTag = opentracing.Tag{Key: string(ext.Component), Value: "gRPC"} )
Functions ¶
func LogInterceptor ¶
func LogInterceptor(log zerolog.Logger) grpc.UnaryServerInterceptor
LogInterceptor rpc 接口日志中间件,用来记录每个 RPC 调用的 请求参数和返回值
func OpenTracingClientInterceptor ¶
func OpenTracingClientInterceptor(tracer opentracing.Tracer) grpc.UnaryClientInterceptor
OpenTracingClientInterceptor rewrite client's interceptor with open tracing
Types ¶
type MDReaderWriter ¶
MDReaderWriter metadata Reader and Writer
func (MDReaderWriter) ForeachKey ¶
func (c MDReaderWriter) ForeachKey(handler func(key, val string) error) error
ForeachKey range all keys to call handler
func (MDReaderWriter) Set ¶
func (c MDReaderWriter) Set(key, val string)
Set implements Set() of opentracing.TextMapWriter
Click to show internal directories.
Click to hide internal directories.