Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // UnaryServerInterceptor is alias for otelgrpc.UnaryServerInterceptor. UnaryServerInterceptor = otelgrpc.UnaryServerInterceptor // StreamServerInterceptor is alias for otelgrpc.StreamServerInterceptor. StreamServerInterceptor = otelgrpc.StreamServerInterceptor )
View Source
var ( // UnaryClientInterceptor is alias for otelgrpc.UnaryClientInterceptor. UnaryClientInterceptor = otelgrpc.UnaryClientInterceptor // StreamClientInterceptor is alias for otelgrpc.StreamClientInterceptor. StreamClientInterceptor = otelgrpc.StreamClientInterceptor )
View Source
var ( // GinMiddleware is alias for otelgin.Middleware. GinMiddleware = otelgin.Middleware // HTTPMiddleware is alias for telhttp.NewHandler. HTTPMiddleware = otelhttp.NewHandler )
View Source
var HTTPTransport = otelhttp.NewTransport
HTTPTransport is alias for otelhttp.NewTransport.
Functions ¶
func DoInSpan ¶
func DoInSpan(ctx context.Context, operationName string, doFn func(context.Context), opts ...otelTrace.SpanStartOption)
DoInSpan executes function doFn inside new span with `operationName` name and hooking as child to a span found within given context if any. It uses opentracing.Tracer propagated in context. If no found, it uses noop tracer notification.
func DoWithSpan ¶
func DoWithSpan(ctx context.Context, operationName string, doFn func(context.Context, otelTrace.Span), opts ...otelTrace.SpanStartOption)
DoWithSpan executes function doFn inside new span with `operationName` name and hooking as child to a span found within given context if any. It uses opentracing.Tracer propagated in context. If no found, it uses noop tracer notification.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.