metrics

package
v2.11.2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEntryPointMiddleware

func NewEntryPointMiddleware(ctx context.Context, next http.Handler, registry metrics.Registry, entryPointName string) http.Handler

NewEntryPointMiddleware creates a new metrics middleware for an Entrypoint.

func NewRetryListener

func NewRetryListener(retryMetrics retryMetrics, serviceName string) retry.Listener

NewRetryListener instantiates a MetricsRetryListener with the given retryMetrics.

func NewRouterMiddleware added in v2.5.0

func NewRouterMiddleware(ctx context.Context, next http.Handler, registry metrics.Registry, routerName string, serviceName string) http.Handler

NewRouterMiddleware creates a new metrics middleware for a Router.

func NewServiceMiddleware

func NewServiceMiddleware(ctx context.Context, next http.Handler, registry metrics.Registry, serviceName string) http.Handler

NewServiceMiddleware creates a new metrics middleware for a Service.

func WrapEntryPointHandler

func WrapEntryPointHandler(ctx context.Context, registry metrics.Registry, entryPointName string) alice.Constructor

WrapEntryPointHandler Wraps metrics entrypoint to alice.Constructor.

func WrapRouterHandler added in v2.5.0

func WrapRouterHandler(ctx context.Context, registry metrics.Registry, routerName string, serviceName string) alice.Constructor

WrapRouterHandler Wraps metrics router to alice.Constructor.

func WrapServiceHandler

func WrapServiceHandler(ctx context.Context, registry metrics.Registry, serviceName string) alice.Constructor

WrapServiceHandler Wraps metrics service to alice.Constructor.

Types

type RetryListener

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

RetryListener is an implementation of the RetryListener interface to record RequestMetrics about retry attempts.

func (*RetryListener) Retried

func (m *RetryListener) Retried(_ *http.Request, _ int)

Retried tracks the retry in the RequestMetrics implementation.

Jump to

Keyboard shortcuts

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