metrics

package
v2.0.0-beta1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2019 License: MIT Imports: 15 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 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 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(req *http.Request, attempt 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