legacyregistry

package
Version: v0.24.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: Apache-2.0 Imports: 4 Imported by: 168

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// DefaultGatherer exposes the global registry gatherer
	DefaultGatherer metrics.Gatherer = defaultRegistry
	// Reset calls reset on the global registry
	Reset = defaultRegistry.Reset
	// MustRegister registers registerable metrics but uses the global registry.
	MustRegister = defaultRegistry.MustRegister
	// RawMustRegister registers prometheus collectors but uses the global registry, this
	// bypasses the metric stability framework
	//
	// Deprecated
	RawMustRegister = defaultRegistry.RawMustRegister

	// Register registers a collectable metric but uses the global registry
	Register = defaultRegistry.Register
)

Functions

func CustomMustRegister added in v0.17.0

func CustomMustRegister(cs ...metrics.StableCollector)

CustomMustRegister registers custom collectors but uses the global registry.

func CustomRegister added in v0.17.0

func CustomRegister(c metrics.StableCollector) error

CustomRegister registers a custom collector but uses the global registry.

func Handler added in v0.16.4

func Handler() http.Handler

Handler returns an HTTP handler for the DefaultGatherer. It is already instrumented with InstrumentHandler (using "prometheus" as handler name).

func HandlerWithReset added in v0.19.0

func HandlerWithReset() http.Handler

HandlerWithReset returns an HTTP handler for the DefaultGatherer but invokes registry reset if the http method is DELETE.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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