metrics

package
v1.172.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for metrics.

func NewClient

func NewClient(meter metric.Meter) *Client

NewClient for metrics.

func (*Client) StreamInterceptor

func (c *Client) StreamInterceptor() grpc.StreamClientInterceptor

StreamInterceptor is a gRPC client-side interceptor that provides prometheus monitoring for Streaming RPCs.

func (*Client) UnaryInterceptor

func (c *Client) UnaryInterceptor() grpc.UnaryClientInterceptor

UnaryInterceptor is a gRPC client-side interceptor that provides prometheus monitoring for Unary RPCs.

type ClientStream added in v1.172.9

type ClientStream struct {
	grpc.ClientStream
	// contains filtered or unexported fields
}

ClientStream wraps grpc.ClientStream allowing each Sent/Recv of message to increment counters.

func NewClientStream added in v1.172.9

func NewClientStream(params ClientStreamParams) *ClientStream

NewClientStream for metrics.

func (*ClientStream) RecvMsg added in v1.172.9

func (s *ClientStream) RecvMsg(m any) error

func (*ClientStream) SendMsg added in v1.172.9

func (s *ClientStream) SendMsg(m any) error

type ClientStreamParams added in v1.172.9

type ClientStreamParams struct {
	Options          metric.MeasurementOption
	Received         metric.Int64Counter
	Sent             metric.Int64Counter
	Handled          metric.Int64Counter
	HandledHistogram metric.Float64Histogram

	grpc.ClientStream
}

ClientStreamParams for metrics.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server for metrics.

func NewServer

func NewServer(meter metric.Meter) *Server

NewServer for metrics.

func (*Server) StreamInterceptor

func (s *Server) StreamInterceptor() grpc.StreamServerInterceptor

StreamInterceptor for metrics.

func (*Server) UnaryInterceptor

func (s *Server) UnaryInterceptor() grpc.UnaryServerInterceptor

UnaryInterceptor for metrics.

type ServerStream added in v1.172.9

type ServerStream struct {
	grpc.ServerStream
	// contains filtered or unexported fields
}

ServerStream wraps grpc.ServerStream allowing each Sent/Recv of message to increment counters.

func NewServerStream added in v1.172.9

func NewServerStream(params ServerStreamParams) *ServerStream

NewServerStream for metrics.

func (*ServerStream) RecvMsg added in v1.172.9

func (s *ServerStream) RecvMsg(m any) error

func (*ServerStream) SendMsg added in v1.172.9

func (s *ServerStream) SendMsg(m any) error

type ServerStreamParams added in v1.172.9

type ServerStreamParams struct {
	Options          metric.MeasurementOption
	Received         metric.Int64Counter
	Sent             metric.Int64Counter
	Handled          metric.Int64Counter
	HandledHistogram metric.Float64Histogram

	grpc.ServerStream
}

ServerStreamParams for metrics.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL