metrics

package
v0.0.0-...-8764492 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrometheusBackend = "prometheus"
	ExpvarBackend     = "expvar"
	NoneBackend       = ""
)

Variables

View Source
var (
	NullFactory   = metrics.NullFactory
	NullCounter   = metrics.NullCounter
	NullGauge     = metrics.NullGauge
	NullTimer     = metrics.NullTimer
	NullHistogram = metrics.NullHistogram
	MustInit      = metrics.MustInit
	Init          = metrics.Init
)

Functions

This section is empty.

Types

type Builder

type Builder struct {
	AppName      string
	JobName      string
	PushTo       string
	PushInterval time.Duration
	Backend      string
	HTTPRoute    string // endpoint name to expose metrics, e.g. for scraping
	// contains filtered or unexported fields
}

Builder provides command line options to configure metrics backend used by Jaeger executables.

func NewBuilder

func NewBuilder(appName, jobName, pushTo string, pushInterval time.Duration, backend, httpRoute string) *Builder

func (*Builder) CreateMetricsFactory

func (b *Builder) CreateMetricsFactory(namespace string) (metrics.Factory, error)

CreateMetricsFactory creates a metrics factory based on the configured type of the backend. If the metrics backend supports HTTP endpoint for scraping, it is stored in the builder and can be later added by RegisterHandler function.

func (*Builder) Handler

func (b *Builder) Handler() http.Handler

Handler returns an http.Handler for the metrics endpoint.

type Counter

type Counter = metrics.Counter

type Factory

type Factory = metrics.Factory

type Gauge

type Gauge = metrics.Gauge

type Histogram

type Histogram = metrics.Histogram

type HistogramOptions

type HistogramOptions = metrics.HistogramOptions

type NSOptions

type NSOptions = metrics.NSOptions

type Options

type Options = metrics.Options

type Timer

type Timer = metrics.Timer

type TimerOptions

type TimerOptions = metrics.TimerOptions

Jump to

Keyboard shortcuts

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