http_metrics

package
v1.39.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientEndpoint

func ClientEndpoint(ctx context.Context) string

func ClientEndpointToContext

func ClientEndpointToContext(ctx context.Context, endpoint string) context.Context

func ServerEndpoint

func ServerEndpoint(ctx context.Context) string

func ServerEndpointToContext

func ServerEndpointToContext(ctx context.Context, endpoint string) context.Context

Types

type ClientStorage

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

func NewClientStorage

func NewClientStorage(reg *metrics.Registry) *ClientStorage

func (*ClientStorage) ObserveConnEstablishment added in v1.38.0

func (s *ClientStorage) ObserveConnEstablishment(endpoint string, duration time.Duration)

func (*ClientStorage) ObserveDnsLookup added in v1.38.0

func (s *ClientStorage) ObserveDnsLookup(endpoint string, duration time.Duration)

func (*ClientStorage) ObserveDuration

func (s *ClientStorage) ObserveDuration(endpoint string, duration time.Duration)

func (*ClientStorage) ObserveRequestWriting added in v1.38.0

func (s *ClientStorage) ObserveRequestWriting(endpoint string, duration time.Duration)

func (*ClientStorage) ObserveResponseReading added in v1.38.0

func (s *ClientStorage) ObserveResponseReading(endpoint string, duration time.Duration)

type ServerStorage

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

func NewServerStorage

func NewServerStorage(reg *metrics.Registry) *ServerStorage

func (*ServerStorage) CountStatusCode

func (s *ServerStorage) CountStatusCode(method string, endpoint string, code int)

func (*ServerStorage) ObserveDuration

func (s *ServerStorage) ObserveDuration(method string, endpoint string, duration time.Duration)

func (*ServerStorage) ObserveRequestBodySize

func (s *ServerStorage) ObserveRequestBodySize(method string, endpoint string, size int)

func (*ServerStorage) ObserveResponseBodySize

func (s *ServerStorage) ObserveResponseBodySize(method string, endpoint string, size int)

Jump to

Keyboard shortcuts

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