adapters

package
v2.4.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: Apache-2.0 Imports: 3 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapFactoryWithTags

func WrapFactoryWithTags(f FactoryWithTags, options Options) metrics.Factory

WrapFactoryWithTags creates a real metrics.Factory that supports subscopes.

func WrapFactoryWithoutTags

func WrapFactoryWithoutTags(f FactoryWithoutTags, options Options) metrics.Factory

WrapFactoryWithoutTags creates a real metrics.Factory that supports subscopes.

Types

type FactoryWithTags

type FactoryWithTags interface {
	Counter(options metrics.Options) metrics.Counter
	Gauge(options metrics.Options) metrics.Gauge
	Timer(options metrics.TimerOptions) metrics.Timer
	Histogram(options metrics.HistogramOptions) metrics.Histogram
}

FactoryWithTags creates metrics with fully qualified name and tags.

type FactoryWithoutTags

type FactoryWithoutTags interface {
	Counter(options TaglessOptions) metrics.Counter
	Gauge(options TaglessOptions) metrics.Gauge
	Timer(options TaglessTimerOptions) metrics.Timer
	Histogram(options TaglessHistogramOptions) metrics.Histogram
}

FactoryWithoutTags creates metrics based on name only, without tags. Suitable for integrating with statsd-like backends that don't support tags.

type Options

type Options struct {
	ScopeSep string
	TagsSep  string
	TagKVSep string
}

Options affect how the adapter factory behaves.

type TaglessHistogramOptions

type TaglessHistogramOptions struct {
	Name    string
	Help    string
	Buckets []float64
}

TaglessHistogramOptions defines the information associated with a metric

type TaglessOptions

type TaglessOptions struct {
	Name string
	Help string
}

TaglessOptions defines the information associated with a metric

type TaglessTimerOptions

type TaglessTimerOptions struct {
	Name    string
	Help    string
	Buckets []time.Duration
}

TaglessTimerOptions defines the information associated with a metric

Jump to

Keyboard shortcuts

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