Back to

Package echoprometheus

Latest Go to latest

The latest major version is .

Published: Mar 7, 2020 | License: MIT | Module:



var (
	// DefaultPrometheusConfig supplies Prometheus client with the default
	// skipper and the 'echo' namespace.
	DefaultPrometheusConfig = PrometheusConfig{
		Skipper:   middleware.DefaultSkipper,
		Namespace: "echo",

func NewMetric

func NewMetric() echo.MiddlewareFunc

NewMetric returns an echo middleware with the default configuration.

func NewMetricWithConfig

func NewMetricWithConfig(config PrometheusConfig) echo.MiddlewareFunc

NewMetricWithConfig returns an echo middleware with a custom configuration.

type PrometheusConfig

type PrometheusConfig struct {
	// Skipper defines a function to skip middleware.
	Skipper middleware.Skipper

	// Namespace is single-word prefix relevant to the domain the metric
	// belongs to. For metrics specific to an application, the prefix is
	// usually the application name itself.
	Namespace string

PrometheusConfig contains the configuation for the echo-prometheus middleware.

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