metrics

package
v0.24.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (

	// ProtocolHTTPConnect means that the proxy protocol is http-connect.
	ProtocolHTTPConnect = "http_connect"
	// ProtocolGRPC means that the proxy protocol is the GRPC protocol.
	ProtocolGRPC = "grpc"
	// TransportTCP means that the transport is TCP.
	TransportTCP = "tcp"
	// TransportUDS means that the transport is UDS.
	TransportUDS = "uds"
	// StageConnect indicates that the dial failed at establishing connection to the proxy server.
	StageConnect = "connect"
	// StageProxy indicates that the dial failed at requesting the proxy server to proxy.
	StageProxy = "proxy"
)

Variables

View Source
var (

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

Functions

This section is empty.

Types

type DialMetrics

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

DialMetrics instruments dials to proxy server with prometheus metrics.

func (*DialMetrics) Clock

func (m *DialMetrics) Clock() clock.Clock

Clock returns the clock.

func (*DialMetrics) ObserveDialFailure

func (m *DialMetrics) ObserveDialFailure(protocol, transport, stage string)

ObserveDialFailure records a failed dial, labeled by protocol, transport, and the stage the dial failed at.

func (*DialMetrics) ObserveDialLatency

func (m *DialMetrics) ObserveDialLatency(elapsed time.Duration, protocol, transport string)

ObserveDialLatency records the latency of a dial, labeled by protocol, transport.

func (*DialMetrics) Reset

func (m *DialMetrics) Reset()

Reset resets the metrics.

func (*DialMetrics) SetClock

func (m *DialMetrics) SetClock(c clock.Clock)

SetClock sets the clock.

Jump to

Keyboard shortcuts

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