xkit

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wrap

func Wrap(namespace string, f Factory, options ...FactoryOption) metrics.Factory

Wrap is used to create an adapter from xkit.Factory to metrics.Factory.

Types

type Capabilities

type Capabilities struct {
	// Tagging indicates whether the factory has the capability for tagged metrics
	Tagging bool
}

Capabilities describes capabilities of a specific metrics factory.

type Counter

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

Counter is an adapter from go-kit Counter to jaeger-lib Counter

func NewCounter

func NewCounter(counter kit.Counter) *Counter

NewCounter creates a new Counter

func (*Counter) Inc

func (c *Counter) Inc(delta int64)

Inc adds the given value to the counter.

type Factory

type Factory interface {
	Counter(name string) kit.Counter
	Gauge(name string) kit.Gauge
	Histogram(name string) kit.Histogram
	Capabilities() Capabilities
}

Factory provides a unified interface for creating named metrics from various go-kit metrics implementations.

type FactoryOption

type FactoryOption func(*factory)

FactoryOption is a function that adjusts some parameters of the factory.

func ScopeSeparator

func ScopeSeparator(scopeSep string) FactoryOption

ScopeSeparator returns an option that overrides default scope separator.

func TagsSeparator

func TagsSeparator(tagsSep string) FactoryOption

TagsSeparator returns an option that overrides default tags separator.

type Gauge

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

Gauge is an adapter from go-kit Gauge to jaeger-lib Gauge

func NewGauge

func NewGauge(gauge kit.Gauge) *Gauge

NewGauge creates a new Gauge

func (*Gauge) Update

func (g *Gauge) Update(value int64)

Update the gauge to the value passed in.

type Timer

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

Timer is an adapter from go-kit Histogram to jaeger-lib Timer

func NewTimer

func NewTimer(hist kit.Histogram) *Timer

NewTimer creates a new Timer

func (*Timer) Record

func (t *Timer) Record(delta time.Duration)

Record saves the time passed in.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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