Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientHandler ¶
NewClientHandler creates a stats.Handler for a gRPC client.
func NewServerHandler ¶
NewServerHandler creates a stats.Handler for a gRPC server.
Types ¶
type Filter ¶
type Filter func(*stats.RPCTagInfo) bool
Filter is a predicate used to determine whether a given request in should be instrumented by the attached RPC tag info. A Filter must return true if the request should be instrumented.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option applies an option value for a config.
func WithFilter ¶
WithFilter returns an Option to use the request filter.
func WithMessageEvents ¶
WithMessageEvents configures the Handler to record the specified events (span.AddEvent) on spans. By default only summary attributes are added at the end of the request.
Valid events are:
- ReceivedEvents: Record the number of bytes read after every gRPC read operation.
- SentEvents: Record the number of bytes written after every gRPC write operation.
func WithPropagators ¶
func WithPropagators(p propagation.TextMapPropagator) Option
WithPropagators returns an Option to use the Propagators when extracting and injecting trace context from requests.
func WithSpanOptions ¶
func WithSpanOptions(opts ...trace.SpanStartOption) Option
WithSpanOptions configures an additional set of trace.SpanOptions, which are applied to each new span.
func WithTracerProvider ¶
func WithTracerProvider(tp trace.TracerProvider) Option
WithTracerProvider returns an Option to use the TracerProvider when creating a Tracer.