metrics

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Recorder               Recorder
	SplitStatus            bool
	DisableMeasureSize     bool
	DisableMeasureInflight bool
	HandlerNameExtractor   func(req *http.Request) string
}

func NewConfig

func NewConfig(recorder Recorder) *Config

type Recorder

type Recorder interface {
	RegisterOn(registry prometheus.Registerer) Recorder
	ObserveHTTPRequestDuration(ctx context.Context, id string, duration time.Duration, method, code string)
	ObserveHTTPResponseSize(ctx context.Context, id string, sizeBytes int64, method, code string)
	AddInflightRequests(ctx context.Context, id string, quantity int)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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