component-base: k8s.io/component-base/metrics/legacyregistry Index | Files

package legacyregistry

import "k8s.io/component-base/metrics/legacyregistry"

Index

Package Files

registry.go

Variables

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
)

func CustomMustRegister Uses

func CustomMustRegister(cs ...metrics.StableCollector)

CustomMustRegister registers custom collectors but uses the global registry.

func CustomRegister Uses

func CustomRegister(c metrics.StableCollector) error

CustomRegister registers a custom collector but uses the global registry.

func Handler Uses

func Handler() http.Handler

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

Deprecated: Please note the issues described in the doc comment of InstrumentHandler. You might want to consider using promhttp.Handler instead.

func HandlerWithReset Uses

func HandlerWithReset() http.Handler

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

Package legacyregistry imports 4 packages (graph) and is imported by 283 packages. Updated 2020-07-20. Refresh now. Tools for package owners.