Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultPrometheusConfig supplies Prometheus client with the default // skipper and the 'echo' namespace. DefaultPrometheusConfig = PrometheusConfig{ Skipper: middleware.DefaultSkipper, Namespace: "echo", } )
Functions ¶
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.
Types ¶
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.
Click to show internal directories.
Click to hide internal directories.