http_metrics

package
v1.29.2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientEndpoint added in v1.22.0

func ClientEndpoint(ctx context.Context) string

func ClientEndpointToContext added in v1.22.0

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

func ServerEndpoint added in v1.22.0

func ServerEndpoint(ctx context.Context) string

func ServerEndpointToContext added in v1.22.0

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

Types

type ClientStorage added in v1.12.0

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

func NewClientStorage added in v1.12.0

func NewClientStorage(reg *metrics.Registry) *ClientStorage

func (*ClientStorage) ObserveDuration added in v1.12.0

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

type ServerStorage added in v1.12.0

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

func NewServerStorage added in v1.12.0

func NewServerStorage(reg *metrics.Registry) *ServerStorage

func (*ServerStorage) CountStatusCode added in v1.12.0

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

func (*ServerStorage) ObserveDuration added in v1.12.0

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

func (*ServerStorage) ObserveRequestBodySize added in v1.12.0

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

func (*ServerStorage) ObserveResponseBodySize added in v1.12.0

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