Documentation
¶
Index ¶
- Constants
- Variables
- func NewClientTraceWrapper(trace opentracing.Tracer) client.Wrapper
- func NewServerTraceHandler(trace opentracing.Tracer) server.HandlerWrapper
- func StartSpanFromContext(ctx context.Context, tracer opentracing.Tracer, endpoint string) (context.Context, opentracing.Span, error)
- type RpcClientContext
- type TraceWrapper
- func (o *TraceWrapper) Call(ctx context.Context, req client.Request, rsp interface{}, ...) (err error)
- func (o *TraceWrapper) Publish(ctx context.Context, p client.Message, opts ...client.PublishOption) error
- func (o *TraceWrapper) Stream(ctx context.Context, req client.Request, opts ...client.CallOption) (client.Stream, error)
Constants ¶
View Source
const RpcContextKey = "_rpc_context_key"
Variables ¶
View Source
var ( //TracingComponentTag tags TracingComponentTag = opentracing.Tag{Key: string(ext.Component), Value: "gRPC"} )
Functions ¶
func NewClientTraceWrapper ¶
NewClientTraceWrapper accepts an open tracing Trace and returns a Client Wrapper
func NewServerTraceHandler ¶
func NewServerTraceHandler(trace opentracing.Tracer) server.HandlerWrapper
func StartSpanFromContext ¶
func StartSpanFromContext(ctx context.Context, tracer opentracing.Tracer, endpoint string) (context.Context, opentracing.Span, error)
StartSpanFromContext returns a new span with the given operation name and options. If a span is found in the context, it will be used as the parent of the resulting span.
Types ¶
type RpcClientContext ¶
type TraceWrapper ¶
TraceWrapper trace 包装器
func (*TraceWrapper) Call ¶
func (o *TraceWrapper) Call(ctx context.Context, req client.Request, rsp interface{}, opts ...client.CallOption) (err error)
func (*TraceWrapper) Publish ¶
func (o *TraceWrapper) Publish(ctx context.Context, p client.Message, opts ...client.PublishOption) error
Click to show internal directories.
Click to hide internal directories.