Documentation ¶
Index ¶
- func FieldsProducer(ctx context.Context) logrus.Fields
- type PayloadBytes
- func (s *PayloadBytes) HandleConn(context.Context, stats.ConnStats)
- func (s *PayloadBytes) HandleRPC(ctx context.Context, rs stats.RPCStats)
- func (s *PayloadBytes) TagConn(ctx context.Context, _ *stats.ConnTagInfo) context.Context
- func (s *PayloadBytes) TagRPC(ctx context.Context, _ *stats.RPCTagInfo) context.Context
- type PayloadBytesStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PayloadBytes ¶
type PayloadBytes struct{}
PayloadBytes implements stats.Handler and tracks amount of bytes received and send by gRPC service for each method call. The information about statistics is added into the context and can be extracted with payloadBytesStatsFromContext.
func (*PayloadBytes) HandleConn ¶
func (s *PayloadBytes) HandleConn(context.Context, stats.ConnStats)
HandleConn exists to satisfy gRPC stats.Handler.
func (*PayloadBytes) HandleRPC ¶
func (s *PayloadBytes) HandleRPC(ctx context.Context, rs stats.RPCStats)
HandleRPC implements per-RPC tracing and stats instrumentation.
func (*PayloadBytes) TagConn ¶
func (s *PayloadBytes) TagConn(ctx context.Context, _ *stats.ConnTagInfo) context.Context
TagConn exists to satisfy gRPC stats.Handler. We don't gather connection level stats and are thus not currently using it.
func (*PayloadBytes) TagRPC ¶
func (s *PayloadBytes) TagRPC(ctx context.Context, _ *stats.RPCTagInfo) context.Context
TagRPC initializes context with an RPC specific stats collector. The returned context will be used in method invocation as is passed into HandleRPC.
type PayloadBytesStats ¶
type PayloadBytesStats struct { // InPayloadBytes amount of bytes received. InPayloadBytes int64 // OutPayloadBytes amount of bytes sent. OutPayloadBytes int64 }
PayloadBytesStats contains info about bytes received and sent by the gRPC method.
func (*PayloadBytesStats) Fields ¶
func (s *PayloadBytesStats) Fields() logrus.Fields
Fields returns logging info.