Back to godoc.org
github.com/globocom/echo-prometheus

Package echoprometheus

v0.1.2
Latest Go to latest

The highest tagged major version is .

Published: Oct 31, 2019 | License: MIT | Module: github.com/globocom/echo-prometheus

Index

Variables

var DefaultConfig = Config{
	Namespace: "echo",
	Subsystem: "http",
	Buckets: []float64{
		0.0005,
		0.001,
		0.002,
		0.005,
		0.01,
		0.02,
		0.05,
		0.1,
		0.2,
		0.5,
		1.0,
		2.0,
		5.0,
		10.0,
		15.0,
		20.0,
		30.0,
	},
	NormalizeHTTPStatus: true,
}

DefaultConfig has the default instrumentation config

func MetricsMiddleware

func MetricsMiddleware() echo.MiddlewareFunc

MetricsMiddleware returns an echo middleware with default config for instrumentation.

func MetricsMiddlewareWithConfig

func MetricsMiddlewareWithConfig(config Config) echo.MiddlewareFunc

MetricsMiddlewareWithConfig returns an echo middleware for instrumentation.

type Config

type Config struct {
	Namespace           string
	Buckets             []float64
	Subsystem           string
	NormalizeHTTPStatus bool
}

Config responsible to configure middleware

func NewConfig

func NewConfig() Config

NewConfig returns a new config with default values

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier