metrics

package
v0.33.7 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: Apache-2.0 Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.31.5

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.31.5

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