metrics

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Namespace = "konnectivity_network_proxy"
	Subsystem = "server"

	// Proxy is the ProxyService method used to handle incoming streams.
	Proxy = "Proxy"
	// Connect is the AgentService method used to establish next hop.
	Connect = "Connect"
)

Variables

View Source
var (

	// Metrics provides access to all dial metrics.
	Metrics = newServerMetrics()
)

Functions

This section is empty.

Types

type DialFailureReason added in v0.0.33

type DialFailureReason string
const (
	DialFailureNoAgent              DialFailureReason = "no_agent"              // No available agent is connected.
	DialFailureErrorResponse        DialFailureReason = "error_response"        // Dial failure reported by the agent back to the server.
	DialFailureUnrecognizedResponse DialFailureReason = "unrecognized_response" // Dial repsonse received for unrecognozide dial ID.
	DialFailureSendResponse         DialFailureReason = "send_rsp"              // Successful dial response from agent, but failed to send to frontend.
	DialFailureBackendClose         DialFailureReason = "backend_close"         // Received a DIAL_CLS from the backend before the dial completed.
	DialFailureFrontendClose        DialFailureReason = "frontend_close"        // Received a DIAL_CLS from the frontend before the dial completed.
)

type ServerMetrics

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

ServerMetrics includes all the metrics of the proxy server.

func (*ServerMetrics) ConnectionDec added in v0.0.17

func (s *ServerMetrics) ConnectionDec(serviceMethod string)

ConnectionDec decrements a finished grpc client connection.

func (*ServerMetrics) ConnectionInc added in v0.0.17

func (s *ServerMetrics) ConnectionInc(serviceMethod string)

ConnectionInc increments a new grpc client connection.

func (*ServerMetrics) FullRecvChannel added in v0.0.33

func (s *ServerMetrics) FullRecvChannel(serviceMethod string) prometheus.Gauge

FullRecvChannel retrieves the metric for counting full receive channels.

func (*ServerMetrics) HTTPConnectionDec added in v0.0.25

func (s *ServerMetrics) HTTPConnectionDec()

HTTPConnectionDec decrements a finished HTTP CONNECTION connection.

func (*ServerMetrics) HTTPConnectionInc added in v0.0.25

func (s *ServerMetrics) HTTPConnectionInc()

HTTPConnectionDec increments a new HTTP CONNECTION connection.

func (*ServerMetrics) ObserveDialFailure added in v0.0.33

func (s *ServerMetrics) ObserveDialFailure(reason DialFailureReason)

func (*ServerMetrics) ObserveDialLatency

func (s *ServerMetrics) ObserveDialLatency(elapsed time.Duration)

ObserveDialLatency records the latency of dial to the remote endpoint.

func (*ServerMetrics) ObserveFrontendWriteLatency added in v0.0.20

func (s *ServerMetrics) ObserveFrontendWriteLatency(elapsed time.Duration)

ObserveFrontendWriteLatency records the latency of blocking on stream send to the client.

func (*ServerMetrics) ObservePacket added in v0.0.34

func (s *ServerMetrics) ObservePacket(segment commonmetrics.Segment, packetType client.PacketType)

func (*ServerMetrics) ObserveStreamError added in v0.0.34

func (s *ServerMetrics) ObserveStreamError(segment commonmetrics.Segment, err error, packetType client.PacketType)

func (*ServerMetrics) ObserveStreamErrorNoPacket added in v0.0.34

func (s *ServerMetrics) ObserveStreamErrorNoPacket(segment commonmetrics.Segment, err error)

func (*ServerMetrics) Reset

func (s *ServerMetrics) Reset()

Reset resets the metrics.

func (*ServerMetrics) SetBackendCount added in v0.0.20

func (s *ServerMetrics) SetBackendCount(count int)

SetBackendCount sets the number of backend connection.

func (*ServerMetrics) SetEstablishedConnCount added in v0.0.37

func (s *ServerMetrics) SetEstablishedConnCount(count int)

SetEstablishedConnCount sets the number of established connections.

func (*ServerMetrics) SetPendingDialCount added in v0.0.23

func (s *ServerMetrics) SetPendingDialCount(count int)

SetPendingDialCount sets the number of pending dials.

Jump to

Keyboard shortcuts

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