Documentation ¶
Index ¶
- Constants
- Variables
- type DialFailureReason
- type ServerMetrics
- func (s *ServerMetrics) ConnectionDec(serviceMethod string)
- func (s *ServerMetrics) ConnectionInc(serviceMethod string)
- func (s *ServerMetrics) FullRecvChannel(serviceMethod string) prometheus.Gauge
- func (s *ServerMetrics) HTTPConnectionDec()
- func (s *ServerMetrics) HTTPConnectionInc()
- func (s *ServerMetrics) ObserveDialFailure(reason DialFailureReason)
- func (s *ServerMetrics) ObserveDialLatency(elapsed time.Duration)
- func (s *ServerMetrics) ObserveFrontendWriteLatency(elapsed time.Duration)
- func (s *ServerMetrics) ObservePacket(segment commonmetrics.Segment, packetType client.PacketType)
- func (s *ServerMetrics) ObserveStreamError(segment commonmetrics.Segment, err error, packetType client.PacketType)
- func (s *ServerMetrics) ObserveStreamErrorNoPacket(segment commonmetrics.Segment, err error)
- func (s *ServerMetrics) Reset()
- func (s *ServerMetrics) SetBackendCount(count int)
- func (s *ServerMetrics) SetPendingDialCount(count int)
Constants ¶
View Source
const ( Namespace = "konnectivity_network_proxy" Subsystem = "server" DialLatencyMetric = "dial_duration_seconds" FrontendLatencyMetric = "frontend_write_duration_seconds" GRPCConnectionsMetric = "grpc_connections" HTTPConnectionsMetric = "http_connections" BackendConnectionsMetric = "ready_backend_connections" PendingDialsMetric = "pending_backend_dials" FullRecvChannelMetric = "full_receive_channels" DialFailuresMetric = "dial_failure_count" // 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 ( 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) SetBackendCount ¶ added in v0.0.20
func (s *ServerMetrics) SetBackendCount(count int)
SetBackendCount sets the number of backend connection.
func (*ServerMetrics) SetPendingDialCount ¶ added in v0.0.23
func (s *ServerMetrics) SetPendingDialCount(count int)
SetPendingDialCount sets the number of pending dials.
Click to show internal directories.
Click to hide internal directories.