Documentation ¶
Index ¶
- func Client(opts ...Option) middleware.Middleware
- func NewBuilder() middleware.MiddlewareBuilder
- func Server(opts ...Option) middleware.Middleware
- func SpanID(ctx sctx.Context) string
- func TraceID(ctx sctx.Context) string
- 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 Config
- type Metadata
- type Option
- type Tracer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBuilder ¶
func NewBuilder() middleware.MiddlewareBuilder
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 Config ¶
type Config struct { SpanKind trace.SpanKind `json:"span_kind" yaml:"span_kind"` Provider string `json:"provider" yaml:"provider"` Propagator string `json:"propagator" yaml:"propagator"` }
{"provider":"skywalking","propagator":"propagator"}
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 WithTracerName ¶
WithTracerName with tracer name.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider with tracer provider. Deprecated: use otel.SetTracerProvider(provider) instead.