Documentation ¶
Index ¶
- func BuildGrpcClientInstrumenter() instrumenter.Instrumenter[grpcRequest, grpcResponse]
- func BuildGrpcServerInstrumenter() instrumenter.Instrumenter[grpcRequest, grpcResponse]
- func NewClientHandler(opts ...Option) stats.Handler
- func NewClientNewHandler(opts ...Option) stats.Handler
- func NewServerHandler(opts ...Option) stats.Handler
- type Event
- type Filter
- type InterceptorInfo
- type InterceptorType
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildGrpcClientInstrumenter ¶
func BuildGrpcClientInstrumenter() instrumenter.Instrumenter[grpcRequest, grpcResponse]
func BuildGrpcServerInstrumenter ¶
func BuildGrpcServerInstrumenter() instrumenter.Instrumenter[grpcRequest, grpcResponse]
func NewClientHandler ¶
func NewClientNewHandler ¶
func NewServerHandler ¶
Types ¶
type Filter ¶
type Filter func(*InterceptorInfo) bool
type InterceptorInfo ¶
type InterceptorInfo struct { // Method is method name registered to UnaryClient and StreamClient Method string // UnaryServerInfo is the metadata for UnaryServer UnaryServerInfo *grpc.UnaryServerInfo // StreamServerInfo if the metadata for StreamServer StreamServerInfo *grpc.StreamServerInfo // Type is the type for interceptor Type InterceptorType }
InterceptorInfo is the union of some arguments to four types of gRPC interceptors.
type InterceptorType ¶
type InterceptorType uint8
InterceptorType is the flag to define which gRPC interceptor the InterceptorInfo object is.
const ( // UndefinedInterceptor is the type for the interceptor information that is not // well initialized or categorized to other types. UndefinedInterceptor InterceptorType = iota // UnaryClient is the type for grpc.UnaryClient interceptor. UnaryClient // StreamClient is the type for grpc.StreamClient interceptor. StreamClient // UnaryServer is the type for grpc.UnaryServer interceptor. UnaryServer // StreamServer is the type for grpc.StreamServer interceptor. StreamServer )
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option applies an option value for a grpcOtelConfig.
func WithInterceptorFilter
deprecated
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.