Documentation ¶
Index ¶
- Constants
- type NetworkReporter
- func (rep *NetworkReporter) CountReceive(ctx context.Context, ss SizesStruct)
- func (rep *NetworkReporter) CountSend(ctx context.Context, ss SizesStruct)
- func (rep *NetworkReporter) HandleConn(_ context.Context, _ stats.ConnStats)
- func (rep *NetworkReporter) HandleRPC(ctx context.Context, rs stats.RPCStats)
- func (rep *NetworkReporter) TagConn(ctx context.Context, _ *stats.ConnTagInfo) context.Context
- func (rep *NetworkReporter) TagRPC(ctx context.Context, s *stats.RPCTagInfo) context.Context
- type SizesStruct
Constants ¶
const ( // ExporterKey is an attribute name that identifies an // exporter component that produces internal metrics, logs, // and traces. ExporterKey = "exporter" // ReceiverKey is an attribute name that identifies an // receiver component that produces internal metrics, logs, // and traces. ReceiverKey = "receiver" // SentBytes is used to track bytes sent by exporters and receivers. SentBytes = "sent" // SentWireBytes is used to track bytes sent on the wire // (includes compression) by exporters and receivers. SentWireBytes = "sent_wire" // RecvBytes is used to track bytes received by exporters and receivers. RecvBytes = "recv" // RecvWireBytes is used to track bytes received on the wire // (includes compression) by exporters and receivers. RecvWireBytes = "recv_wire" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetworkReporter ¶
type NetworkReporter struct {
// contains filtered or unexported fields
}
NetworkReporter is a helper to add network-level observability to an exporter or receiver.
func NewExporterNetworkReporter ¶
func NewExporterNetworkReporter(settings exporter.CreateSettings) (*NetworkReporter, error)
NewExporterNetworkReporter creates a new NetworkReporter configured for an exporter.
func NewReceiverNetworkReporter ¶
func NewReceiverNetworkReporter(settings receiver.CreateSettings) (*NetworkReporter, error)
NewReceiverNetworkReporter creates a new NetworkReporter configured for an exporter.
func (*NetworkReporter) CountReceive ¶
func (rep *NetworkReporter) CountReceive(ctx context.Context, ss SizesStruct)
CountReceive is used to report a message received by the component. For exporters, SizesStruct indicates the size of a response. For receivers, SizesStruct indicates the size of a request.
func (*NetworkReporter) CountSend ¶
func (rep *NetworkReporter) CountSend(ctx context.Context, ss SizesStruct)
CountSend is used to report a message sent by the component. For exporters, SizesStruct indicates the size of a request. For receivers, SizesStruct indicates the size of a response.
func (*NetworkReporter) HandleConn ¶
func (rep *NetworkReporter) HandleConn(_ context.Context, _ stats.ConnStats)
HandleConn implements grpc/stats.Handler
func (*NetworkReporter) HandleRPC ¶
func (rep *NetworkReporter) HandleRPC(ctx context.Context, rs stats.RPCStats)
HandleRPC implements grpc/stats.Handler
func (*NetworkReporter) TagConn ¶
func (rep *NetworkReporter) TagConn(ctx context.Context, _ *stats.ConnTagInfo) context.Context
TagConn implements grpc/stats.Handler
func (*NetworkReporter) TagRPC ¶
func (rep *NetworkReporter) TagRPC(ctx context.Context, s *stats.RPCTagInfo) context.Context
TagRPC implements grpc/stats.Handler
type SizesStruct ¶
SizesStruct is used to pass uncompressed on-wire message lengths to the CountSend() and CountReceive() methods.