metrics

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcknowledgedMessage

func AcknowledgedMessage(msg creator.Message, topic string)

func Address added in v1.1.1

func Address(host string, port int) string

func Close added in v1.1.1

func Close() error

func ConsumerChannelLength added in v1.1.8

func ConsumerChannelLength(count int)

func ConsumerCount added in v1.1.0

func ConsumerCount()

func ConsumerLatency

func ConsumerLatency(dur time.Duration)

func ConsumerMessageProcessingTime added in v1.1.8

func ConsumerMessageProcessingTime(dur time.Duration)

func ConsumerMessageReadTime added in v1.1.8

func ConsumerMessageReadTime(dur time.Duration)

func Count added in v1.1.1

func Count(name string, value int64, tags []string)

func Gauge added in v1.1.1

func Gauge(name string, value float64, tags []string)

func Incr added in v1.1.1

func Incr(metric string, tags []string)

func ProduceLatency

func ProduceLatency(dur time.Duration)

func ProducerChannelLength added in v1.1.0

func ProducerChannelLength(count int)

func ProducerCount added in v1.1.0

func ProducerCount()

func ReportTime added in v1.1.1

func ReportTime(startTime time.Time, tags []string, metricName string)

func ReporterType added in v1.1.1

func ReporterType() string

func SentMessage

func SentMessage(msg creator.Message)

func SetReporter added in v1.1.1

func SetReporter(reporter StatsdReporter)

func Setup

func Setup(cfg config.Prometheus, producerCfg config.Producer)

func SetupPProf added in v1.1.10

func SetupPProf(cfg config.PProf)

func SetupStatsD added in v1.1.1

func SetupStatsD(cfg config.Statsd)

Types

type NopReporter added in v1.1.1

type NopReporter struct{}

func (*NopReporter) Close added in v1.1.1

func (m *NopReporter) Close() error

func (*NopReporter) Count added in v1.1.1

func (m *NopReporter) Count(name string, value int64, tags []string, rate float64) error

func (*NopReporter) Gauge added in v1.1.1

func (m *NopReporter) Gauge(name string, value float64, tags []string, rate float64) error

func (*NopReporter) Incr added in v1.1.1

func (m *NopReporter) Incr(name string, tags []string, rate float64) error

func (*NopReporter) Timing added in v1.1.1

func (m *NopReporter) Timing(name string, value time.Duration, tags []string, rate float64) error

type StatsdConfig added in v1.1.1

type StatsdConfig struct {
	Host    string
	Port    int
	Enabled bool
	Service string
	Tags    []string
}

type StatsdReporter added in v1.1.1

type StatsdReporter interface {
	Timing(name string, value time.Duration, tags []string, rate float64) error
	Incr(name string, tags []string, rate float64) error
	Count(name string, value int64, tags []string, rate float64) error
	Gauge(name string, value float64, tags []string, rate float64) error
	Close() error
}

Jump to

Keyboard shortcuts

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