rainbond: github.com/goodrain/rainbond/node/statsd/exporter Index | Files

package exporter

import "github.com/goodrain/rainbond/node/statsd/exporter"

Index

Package Files

exporter.go mapper.go match.go telemetry.go timer.go

Variables

var (
    ConfigLoads = prometheus.NewCounterVec(
        prometheus.CounterOpts{
            Name: "statsd_exporter_config_reloads_total",
            Help: "The number of configuration reloads.",
        },
        []string{"outcome"},
    )
)

func MetryInit Uses

func MetryInit(registry *prometheus.Registry)

MetryInit init

type CounterContainer Uses

type CounterContainer struct {
    Elements map[uint64]prometheus.Counter
    Register prometheus.Registerer
}

func NewCounterContainer Uses

func NewCounterContainer(Register prometheus.Registerer) *CounterContainer

func (*CounterContainer) Get Uses

func (c *CounterContainer) Get(metricName string, labels prometheus.Labels, help string) (prometheus.Counter, error)

type CounterEvent Uses

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

func (*CounterEvent) Labels Uses

func (c *CounterEvent) Labels() map[string]string

func (*CounterEvent) MetricName Uses

func (c *CounterEvent) MetricName() string

func (*CounterEvent) Value Uses

func (c *CounterEvent) Value() float64

type Event Uses

type Event interface {
    MetricName() string
    Value() float64
    Labels() map[string]string
}

type Events Uses

type Events []Event

type Exporter Uses

type Exporter struct {
    Counters   *CounterContainer
    Gauges     *GaugeContainer
    Summaries  *SummaryContainer
    Histograms *HistogramContainer
    // contains filtered or unexported fields
}

func NewExporter Uses

func NewExporter(mapper *MetricMapper, Register prometheus.Registerer) *Exporter

NewExporter new exporter

func (*Exporter) GCollector Uses

func (b *Exporter) GCollector()

GCollector 循环检查Exporter对象中的性能指标数据是否有过期,有则清除

func (*Exporter) Listen Uses

func (b *Exporter) Listen(e <-chan Events)

type GaugeContainer Uses

type GaugeContainer struct {
    Elements map[uint64]prometheus.Gauge
    Register prometheus.Registerer
}

func NewGaugeContainer Uses

func NewGaugeContainer(Register prometheus.Registerer) *GaugeContainer

func (*GaugeContainer) Get Uses

func (c *GaugeContainer) Get(metricName string, labels prometheus.Labels, help string) (prometheus.Gauge, error)

type GaugeEvent Uses

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

func (*GaugeEvent) Labels Uses

func (c *GaugeEvent) Labels() map[string]string

func (*GaugeEvent) MetricName Uses

func (g *GaugeEvent) MetricName() string

func (*GaugeEvent) Value Uses

func (g *GaugeEvent) Value() float64

type HistogramContainer Uses

type HistogramContainer struct {
    Elements map[uint64]prometheus.Histogram

    Register prometheus.Registerer
    // contains filtered or unexported fields
}

func NewHistogramContainer Uses

func NewHistogramContainer(mapper *MetricMapper, Register prometheus.Registerer) *HistogramContainer

func (*HistogramContainer) Get Uses

func (c *HistogramContainer) Get(metricName string, labels prometheus.Labels, help string, mapping *metricMapping) (prometheus.Histogram, error)

type MetricMapper Uses

type MetricMapper struct {
    Defaults mapperConfigDefaults `yaml:"defaults"`
    Mappings []metricMapping      `yaml:"mappings"`
    // contains filtered or unexported fields
}

MetricMapper MetricMapper

func InitMapping Uses

func InitMapping() (*MetricMapper, error)

InitMapping init mapping config

func (*MetricMapper) InitFromFile Uses

func (m *MetricMapper) InitFromFile(fileName string) error

InitFromFile InitFromFile

func (*MetricMapper) InitFromYAMLString Uses

func (m *MetricMapper) InitFromYAMLString(fileContents string) error

InitFromYAMLString InitFromYAMLString

type StatsDTCPListener Uses

type StatsDTCPListener struct {
    Conn *net.TCPListener
}

func (*StatsDTCPListener) Listen Uses

func (l *StatsDTCPListener) Listen(e chan<- Events)

type StatsDUDPListener Uses

type StatsDUDPListener struct {
    Conn *net.UDPConn
}

func (*StatsDUDPListener) Listen Uses

func (l *StatsDUDPListener) Listen(e chan<- Events)

type SummaryContainer Uses

type SummaryContainer struct {
    Elements map[uint64]prometheus.Summary
    Register prometheus.Registerer
}

func NewSummaryContainer Uses

func NewSummaryContainer(Register prometheus.Registerer) *SummaryContainer

func (*SummaryContainer) Get Uses

func (c *SummaryContainer) Get(metricName string, labels prometheus.Labels, help string) (prometheus.Summary, error)

type TimerEvent Uses

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

func (*TimerEvent) Labels Uses

func (c *TimerEvent) Labels() map[string]string

func (*TimerEvent) MetricName Uses

func (t *TimerEvent) MetricName() string

func (*TimerEvent) Value Uses

func (t *TimerEvent) Value() float64

Package exporter imports 19 packages (graph) and is imported by 1 packages. Updated 2019-08-23. Refresh now. Tools for package owners.