Documentation
¶
Index ¶
- type Metrics
- func (m *Metrics) AddMapping(mapping proxy.Mapping)
- func (m *Metrics) L4ServiceAdded(mode types.ServiceMode)
- func (m *Metrics) L4ServiceRemoved(mode types.ServiceMode)
- func (m *Metrics) Middleware(next http.Handler) http.Handler
- func (m *Metrics) RecordCertificateIssuance(duration time.Duration)
- func (m *Metrics) RemoveMapping(mapping proxy.Mapping)
- func (m *Metrics) RoundTripper(next http.RoundTripper) http.RoundTripper
- func (m *Metrics) TCPRelayDialError(accountID types.AccountID)
- func (m *Metrics) TCPRelayEnded(accountID types.AccountID, duration time.Duration, srcToDst, dstToSrc int64)
- func (m *Metrics) TCPRelayRejected(accountID types.AccountID)
- func (m *Metrics) TCPRelayStarted(accountID types.AccountID)
- func (m *Metrics) UDPPacketRelayed(direction types.RelayDirection, bytes int)
- func (m *Metrics) UDPSessionDialError(accountID types.AccountID)
- func (m *Metrics) UDPSessionEnded(accountID types.AccountID)
- func (m *Metrics) UDPSessionRejected(accountID types.AccountID)
- func (m *Metrics) UDPSessionStarted(accountID types.AccountID)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics collects OpenTelemetry metrics for the proxy.
func (*Metrics) AddMapping ¶
AddMapping records that a domain mapping was added.
func (*Metrics) L4ServiceAdded ¶ added in v0.67.0
func (m *Metrics) L4ServiceAdded(mode types.ServiceMode)
L4ServiceAdded increments the L4 service gauge for the given mode.
func (*Metrics) L4ServiceRemoved ¶ added in v0.67.0
func (m *Metrics) L4ServiceRemoved(mode types.ServiceMode)
L4ServiceRemoved decrements the L4 service gauge for the given mode.
func (*Metrics) Middleware ¶
Middleware wraps an HTTP handler with request metrics.
func (*Metrics) RecordCertificateIssuance ¶ added in v0.66.3
RecordCertificateIssuance records the duration of a certificate issuance.
func (*Metrics) RemoveMapping ¶
RemoveMapping records that a domain mapping was removed.
func (*Metrics) RoundTripper ¶
func (m *Metrics) RoundTripper(next http.RoundTripper) http.RoundTripper
RoundTripper wraps an http.RoundTripper with backend duration metrics.
func (*Metrics) TCPRelayDialError ¶ added in v0.67.0
TCPRelayDialError records a dial failure for a TCP relay.
func (*Metrics) TCPRelayEnded ¶ added in v0.67.0
func (m *Metrics) TCPRelayEnded(accountID types.AccountID, duration time.Duration, srcToDst, dstToSrc int64)
TCPRelayEnded records a TCP relay connection ending and accumulates bytes and duration.
func (*Metrics) TCPRelayRejected ¶ added in v0.67.0
TCPRelayRejected records a rejected TCP relay (semaphore full).
func (*Metrics) TCPRelayStarted ¶ added in v0.67.0
TCPRelayStarted records a new TCP relay connection starting.
func (*Metrics) UDPPacketRelayed ¶ added in v0.67.0
func (m *Metrics) UDPPacketRelayed(direction types.RelayDirection, bytes int)
UDPPacketRelayed records a packet relayed in the given direction with its size in bytes.
func (*Metrics) UDPSessionDialError ¶ added in v0.67.0
UDPSessionDialError records a dial failure for a UDP session.
func (*Metrics) UDPSessionEnded ¶ added in v0.67.0
UDPSessionEnded records a UDP session ending.
func (*Metrics) UDPSessionRejected ¶ added in v0.67.0
UDPSessionRejected records a rejected UDP session (limit or rate limited).
func (*Metrics) UDPSessionStarted ¶ added in v0.67.0
UDPSessionStarted records a new UDP session starting.