metrics

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

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

	// DirectionToServer indicates that the agent attempts to send a packet
	// to the proxy server.
	DirectionToServer Direction = "to_server"
	// DirectionFromServer indicates that the agent attempts to receive a
	// packet from the proxy server.
	DirectionFromServer Direction = "from_server"
)

Variables

View Source
var (

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

Functions

This section is empty.

Types

type AgentMetrics

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

AgentMetrics includes all the metrics of the proxy agent.

func (*AgentMetrics) EndpointConnectionDec added in v0.0.34

func (a *AgentMetrics) EndpointConnectionDec()

EndpointConnectionDec decrements a finished endpoint connection.

func (*AgentMetrics) EndpointConnectionInc added in v0.0.34

func (a *AgentMetrics) EndpointConnectionInc()

EndpointConnectionInc increments a new endpoint connection.

func (*AgentMetrics) ObserveDialFailure added in v0.0.34

func (a *AgentMetrics) ObserveDialFailure(reason DialFailureReason)

ObserveDialFailure records a remote endpoint dial failure.

func (*AgentMetrics) ObserveDialLatency

func (a *AgentMetrics) ObserveDialLatency(elapsed time.Duration)

ObserveDialLatency records the latency of dial to the remote endpoint.

func (*AgentMetrics) ObservePacket added in v0.0.34

func (a *AgentMetrics) ObservePacket(segment commonmetrics.Segment, packetType client.PacketType)

func (*AgentMetrics) ObserveServerFailureDeprecated added in v0.0.34

func (a *AgentMetrics) ObserveServerFailureDeprecated(direction Direction)

ObserveServerFailure records a failure to send to or receive from the proxy server, labeled by the direction.

func (*AgentMetrics) ObserveStreamError added in v0.0.34

func (a *AgentMetrics) ObserveStreamError(segment commonmetrics.Segment, err error, packetType client.PacketType)

func (*AgentMetrics) ObserveStreamErrorNoPacket added in v0.0.34

func (a *AgentMetrics) ObserveStreamErrorNoPacket(segment commonmetrics.Segment, err error)

func (*AgentMetrics) Reset

func (a *AgentMetrics) Reset()

Reset resets the metrics.

func (*AgentMetrics) SetServerConnectionsCount added in v0.0.34

func (a *AgentMetrics) SetServerConnectionsCount(count int)

type DialFailureReason added in v0.0.34

type DialFailureReason string
const (
	DialFailureTimeout DialFailureReason = "timeout"
	DialFailureUnknown DialFailureReason = "unknown"
)

type Direction

type Direction string

Jump to

Keyboard shortcuts

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