metrics

package
v2.4.0-beta.2-forest Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminMetrics

type AdminMetrics struct{}

AdminMetrics is a module that serves a metrics endpoint so that any gathered metrics can be exposed for scraping. This module is not configurable, and is permanently mounted to the admin API endpoint at "/metrics". See the Metrics module for a configurable endpoint that is usable if the Admin API is disabled.

func (AdminMetrics) CaddyModule

func (AdminMetrics) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*AdminMetrics) Routes

func (m *AdminMetrics) Routes() []caddy.AdminRoute

Routes returns a route for the /metrics endpoint.

type Metrics

type Metrics struct {

	// Disable OpenMetrics negotiation, enabled by default. May be necessary if
	// the produced metrics cannot be parsed by the service scraping metrics.
	DisableOpenMetrics bool `json:"disable_openmetrics,omitempty"`
	// contains filtered or unexported fields
}

Metrics is a module that serves a /metrics endpoint so that any gathered metrics can be exposed for scraping. This module is configurable by end-users unlike AdminMetrics.

func (Metrics) CaddyModule

func (Metrics) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*Metrics) Provision

func (m *Metrics) Provision(ctx caddy.Context) error

Provision sets up m.

func (Metrics) ServeHTTP

func (m Metrics) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error

func (*Metrics) UnmarshalCaddyfile

func (m *Metrics) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

UnmarshalCaddyfile sets up the handler from Caddyfile tokens. Syntax:

metrics [<matcher>] {
    disable_openmetrics
}

Jump to

Keyboard shortcuts

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