metrics

package
v0.32.2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TLSErrorTypeUnknownCA        = "unknown_ca"
	TLSErrorTypeExpiredCert      = "expired_cert"
	TLSErrorTypeCipherMismatch   = "cipher_mismatch"
	TLSErrorTypeHostnameMismatch = "hostname_mismatch"
	TLSErrorTypeOther            = "other"
)

TLS error type constants for categorization.

Variables

This section is empty.

Functions

func NewProxyErrorHandler added in v0.32.0

func NewProxyErrorHandler() func(http.ResponseWriter, *http.Request, error)

NewProxyErrorHandler returns an error handler for httputil.ReverseProxy that tracks TLS connection errors and then delegates to the default behavior.

func Register

func Register()

Register metrics.

func WithBodyTracking added in v0.32.0

func WithBodyTracking(delegate http.Handler) http.Handler

WithBodyTracking wraps the handler to track request and response body bytes. Only requests that are routed to a backend shard (i.e., have a shard name in context) are counted.

func WithLatencyTracking

func WithLatencyTracking(delegate http.Handler) http.Handler

WithLatencyTracking tracks the number of seconds it took the wrapped handler to complete.

Types

This section is empty.

Jump to

Keyboard shortcuts

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