Documentation ¶
Index ¶
- Constants
- func ExtractMQHeader(tracer opentracing.Tracer, msg *clusterSarama.ConsumerMessage) (opentracing.SpanContext, error)
- func FromIncomingHeaders(headers []*clusterSarama.RecordHeader) metadata.MD
- func Init(defaultSrvName string, cfg config.Configuration, options ...config.Option) (opentracing.Tracer, io.Closer)
- func InjectMQHeader(tracer opentracing.Tracer, sm opentracing.SpanContext, ctx context.Context, ...)
- func NewOutgoingHeaders(h []sarama.RecordHeader, md metadata.MD) []sarama.RecordHeader
- func OpenTracingServerMiddleWare() gin.HandlerFunc
- func OpentracingClientInterceptor(ctx context.Context, method string, req, reply interface{}, ...) error
- func OpentracingServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (resp interface{}, err error)
- type TextMapRW
Constants ¶
View Source
const TraceIDLogKey = "traceID"
Variables ¶
This section is empty.
Functions ¶
func ExtractMQHeader ¶
func ExtractMQHeader(tracer opentracing.Tracer, msg *clusterSarama.ConsumerMessage) (opentracing.SpanContext, error)
func FromIncomingHeaders ¶
func FromIncomingHeaders(headers []*clusterSarama.RecordHeader) metadata.MD
func Init ¶
func Init(defaultSrvName string, cfg config.Configuration, options ...config.Option) (opentracing.Tracer, io.Closer)
Init returns an instance of Jaeger Tracer that samples 100% of traces and logs all spans to stdout.
func InjectMQHeader ¶
func NewOutgoingHeaders ¶
将map[string][]string数据格式转换为[]struct{[]byte, []byte}格式
func OpenTracingServerMiddleWare ¶
func OpenTracingServerMiddleWare() gin.HandlerFunc
func OpentracingClientInterceptor ¶
func OpentracingClientInterceptor(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error
func OpentracingServerInterceptor ¶
func OpentracingServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)
Types ¶
Click to show internal directories.
Click to hide internal directories.