metrics

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefObjectives = map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}
)

DefObjectives of prometheus

Functions

func NewPlugin

func NewPlugin(opts ...Option) plugin.Plugin

NewPlugin of metrics

func Size

func Size(r *http.Request) float64

Size returns the size of request object.

Types

type Option

type Option func(o *Options)

Option of metric

func WithNamespace

func WithNamespace(namespace string) Option

WithNamespace of metric

func WithSkipperFunc

func WithSkipperFunc(skipperFunc request.SkipperFunc) Option

WithSkipperFunc of metric

func WithSubsystem

func WithSubsystem(subsystem string) Option

WithSubsystem of metric

type Options

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

Options of metric

type Prometheus

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

Prometheus for metircs

Jump to

Keyboard shortcuts

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