metrics

package
v0.0.0-...-26835a4 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrometheusReporter

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

PrometheusReporter reports metrics to prometheus

func GetPrometheusReporter

func GetPrometheusReporter(game string, port int, constLabels map[string]string, postMetricsScrapeAction func()) *PrometheusReporter

GetPrometheusReporter gets the prometheus reporter singleton

func (*PrometheusReporter) ReportCount

func (p *PrometheusReporter) ReportCount(metric string, labels map[string]string, count float64) error

ReportCount reports a summary metric

  • implements the ReportCount method of the Reporter interface

func (*PrometheusReporter) ReportGauge

func (p *PrometheusReporter) ReportGauge(metric string, labels map[string]string, value float64) error

ReportGauge reports a gauge metric

  • implements the ReportGauge method of the Reporter interface

func (*PrometheusReporter) ReportHistogram

func (p *PrometheusReporter) ReportHistogram(metric string, labels map[string]string, value float64) error

ReportHistogram reports a summary metric

  • implements the ReportHistogram method of the Reporter interface

func (*PrometheusReporter) ReportSummary

func (p *PrometheusReporter) ReportSummary(metric string, labels map[string]string, value float64) error

ReportSummary reports a summary metric

  • implements the ReportSummary method of the Reporter interface

type Reporter

type Reporter interface {
	ReportCount(metric string, tags map[string]string, count float64) error
	ReportSummary(metric string, tags map[string]string, value float64) error
	ReportHistogram(metric string, tags map[string]string, value float64) error
	ReportGauge(metric string, tags map[string]string, value float64) error
}

Reporter interface

Jump to

Keyboard shortcuts

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