Documentation ¶
Index ¶
- func Client(opts ...Option) middleware.Middleware
- func Server(opts ...Option) middleware.Middleware
- type ClientHandler
- func (c *ClientHandler) HandleConn(ctx context.Context, cs stats.ConnStats)
- func (c *ClientHandler) HandleRPC(ctx context.Context, rs stats.RPCStats)
- func (c *ClientHandler) TagConn(ctx context.Context, cti *stats.ConnTagInfo) context.Context
- func (c *ClientHandler) TagRPC(ctx context.Context, rti *stats.RPCTagInfo) context.Context
- type Metadata
- type Option
- type Tracer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Client ¶
func Client(opts ...Option) middleware.Middleware
Client returns a new client middleware for OpenTelemetry.
func Server ¶
func Server(opts ...Option) middleware.Middleware
Server returns a new server middleware for OpenTelemetry.
Types ¶
type ClientHandler ¶
type ClientHandler struct { }
ClientHandler is tracing ClientHandler
func (*ClientHandler) HandleConn ¶
func (c *ClientHandler) HandleConn(ctx context.Context, cs stats.ConnStats)
HandleConn exists to satisfy gRPC stats.Handler.
func (*ClientHandler) HandleRPC ¶
func (c *ClientHandler) HandleRPC(ctx context.Context, rs stats.RPCStats)
HandleRPC implements per-RPC tracing and stats instrumentation.
func (*ClientHandler) TagConn ¶
func (c *ClientHandler) TagConn(ctx context.Context, cti *stats.ConnTagInfo) context.Context
TagConn exists to satisfy gRPC stats.Handler.
func (*ClientHandler) TagRPC ¶
func (c *ClientHandler) TagRPC(ctx context.Context, rti *stats.RPCTagInfo) context.Context
TagRPC implements per-RPC context management.
type Metadata ¶
type Metadata struct{}
Metadata is tracing metadata propagator
func (Metadata) Extract ¶
func (b Metadata) Extract(parent context.Context, carrier propagation.TextMapCarrier) context.Context
Extract returns a copy of parent with the metadata from the carrier added.
func (Metadata) Inject ¶
func (b Metadata) Inject(ctx context.Context, carrier propagation.TextMapCarrier)
Inject sets metadata key-values from ctx into the carrier.
type Option ¶
type Option func(*options)
Option is tracing option.
func WithPropagator ¶
func WithPropagator(propagator propagation.TextMapPropagator) Option
WithPropagator with tracer propagator.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider with tracer provider. Deprecated: use otel.SetTracerProvider(provider) instead.