jaeger-lib: github.com/uber/jaeger-lib/metrics/prometheus Index | Files

package prometheus

import "github.com/uber/jaeger-lib/metrics/prometheus"

Index

Package Files

cache.go factory.go

type Factory Uses

type Factory struct {
    // contains filtered or unexported fields
}

Factory implements metrics.Factory backed by Prometheus registry.

func New Uses

func New(opts ...Option) *Factory

New creates a Factory backed by Prometheus registry. Typically the first argument should be prometheus.DefaultRegisterer.

Parameter buckets defines the buckets into which Timer observations are counted. Each element in the slice is the upper inclusive bound of a bucket. The values must be sorted in strictly increasing order. There is no need to add a highest bucket with +Inf bound, it will be added implicitly. The default value is prometheus.DefBuckets.

func (*Factory) Counter Uses

func (f *Factory) Counter(options metrics.Options) metrics.Counter

Counter implements Counter of metrics.Factory.

func (*Factory) Gauge Uses

func (f *Factory) Gauge(options metrics.Options) metrics.Gauge

Gauge implements Gauge of metrics.Factory.

func (*Factory) Histogram Uses

func (f *Factory) Histogram(options metrics.HistogramOptions) metrics.Histogram

Histogram implements Histogram of metrics.Factory.

func (*Factory) Namespace Uses

func (f *Factory) Namespace(scope metrics.NSOptions) metrics.Factory

Namespace implements Namespace of metrics.Factory.

func (*Factory) Timer Uses

func (f *Factory) Timer(options metrics.TimerOptions) metrics.Timer

Timer implements Timer of metrics.Factory.

type Option Uses

type Option func(*options)

Option is a function that sets some option for the Factory constructor.

func WithBuckets Uses

func WithBuckets(buckets []float64) Option

WithBuckets returns an option that sets the default buckets for histogram. If not used, we fallback to default Prometheus buckets.

func WithRegisterer Uses

func WithRegisterer(registerer prometheus.Registerer) Option

WithRegisterer returns an option that sets the registerer. If not used we fallback to prometheus.DefaultRegisterer.

func WithSeparator Uses

func WithSeparator(separator Separator) Option

WithSeparator returns an option that sets the default separator for the namespace If not used, we fallback to underscore.

type Separator Uses

type Separator rune

Separator represents the namespace separator to use

const (
    // SeparatorUnderscore uses an underscore as separator
    SeparatorUnderscore Separator = '_'

    // SeparatorColon uses a colon as separator
    SeparatorColon = ':'
)

Package prometheus imports 6 packages (graph) and is imported by 25 packages. Updated 2019-08-06. Refresh now. Tools for package owners.