metrics

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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