prometheus

package module
v0.0.0-...-cdadf55 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultBuckets prometheus buckets in seconds.
	DefaultBuckets = []float64{0.3, 1.2, 5.0}
)

Functions

This section is empty.

Types

type Prometheus

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

Prometheus is a handler that exposes prometheus metrics for the number of requests, the latency and the response size, partitioned by status code, method and HTTP path.

Usage: pass its `ServeHTTP` to a route or globally.

func New

func New(name string, buckets ...float64) *Prometheus

New returns a new prometheus middleware.

If buckets are empty then `DefaultBuckets` are set.

func (*Prometheus) ServeHTTP

func (p *Prometheus) ServeHTTP(ctx iris.Context)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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