Documentation ¶
Overview ¶
Package rpctracing implements tracing for rpc.
Package rpctracing implements tracing for rpc.
Package rpctracing implements tracing for rpc.
Index ¶
Constants ¶
View Source
const ( // TraceID is the key we use to store trace id value into context. TraceID = "trace-id" // ParentID is the key we use to store parent's span id value into context. ParentID = "parent-id" // Sampled is the key we use to store sampled flag into context. Sampled = "sampled" )
Variables ¶
This section is empty.
Functions ¶
func IsExcluded ¶
func IsExcluded(span *monkit.Span) bool
IsExcluded check if span shouldn't be reported to remote location. Deprecated: use tracing.IsExcluded.
Types ¶
type ExtractorFunc ¶
ExtractorFunc extracts from some metadata the trace information.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler implements drpc handler interface and takes in a callback function to extract the trace information from some metadata.
func NewHandler ¶
func NewHandler(handler drpc.Handler, cb ExtractorFunc) *Handler
NewHandler returns a new instance of Handler. If the callback is nil, a default one is used.
type TracingWrapper ¶
TracingWrapper wraps a drpc.Conn with tracing information.
func NewTracingWrapper ¶
func NewTracingWrapper(conn rpcpool.Conn) *TracingWrapper
NewTracingWrapper creates a new instance of the wrapper.
Click to show internal directories.
Click to hide internal directories.