Documentation ¶
Index ¶
- func RegisterReporterBuilder(name string, builder ReporterFromConfigBuilder)
- type DataDog
- type DogStatsd
- type Log
- type MetricType
- type Reporter
- func NewDataDogWithConfig(cfg map[string]interface{}) (Reporter, error)
- func NewDogStatsdWithConfig(cfg map[string]interface{}) (Reporter, error)
- func NewLogWithConfig(cfg map[string]interface{}) (Reporter, error)
- func ReporterFromTypeAndConfig(reporterType string, cfg map[string]interface{}) (Reporter, error)
- type ReporterFromConfigBuilder
- type Reporters
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterReporterBuilder ¶
func RegisterReporterBuilder(name string, builder ReporterFromConfigBuilder)
RegisterReporterBuilder can be used in init() methods on reporters to dynamically register
Types ¶
type DataDog ¶
type DataDog struct {
// contains filtered or unexported fields
}
func (*DataDog) ReportEvent ¶
func (*DataDog) ReportMetric ¶
func (d *DataDog) ReportMetric(metricType MetricType, metric string, value float64, tags ...string)
type DogStatsd ¶
type DogStatsd struct {
// contains filtered or unexported fields
}
func (DogStatsd) ReportEvent ¶
func (*DogStatsd) ReportMetric ¶
func (d *DogStatsd) ReportMetric(metricType MetricType, metric string, value float64, tags ...string)
type Log ¶
type Log struct {
// contains filtered or unexported fields
}
Log is a simple log-based reporter to STDOUT.
func (*Log) ReportEvent ¶
ReportEvent will log a new event
func (*Log) ReportMetric ¶
func (r *Log) ReportMetric(metricType MetricType, metric string, value float64, tags ...string)
ReportMetric will log a new metric
type MetricType ¶
type MetricType string
MetricType indicates a valid metric type
const ( CountMetricType MetricType = "count" GaugeMetricType MetricType = "gauge" HistogramMetricType MetricType = "histogram" DistributionMetricType MetricType = "distribution" TimingMetricType MetricType = "timing" )
most common metric types
type Reporter ¶
type Reporter interface { ReportMetric(metricType MetricType, metric string, value float64, tags ...string) ReportEvent(title string, message string, tags ...string) }
Reporter is an interface on which to report events and metrics
func NewDataDogWithConfig ¶
func NewDogStatsdWithConfig ¶
func NewLogWithConfig ¶
NewLogWithConfig will create a new log reporter with config
type ReporterFromConfigBuilder ¶
ReporterFromConfigBuilder defines the common builder interface
type Reporters ¶
Reporters are many reporters convenience function
func (Reporters) ReportEvent ¶
func (Reporters) ReportMetric ¶
func (r Reporters) ReportMetric(metricType MetricType, metric string, value float64, tags ...string)
Click to show internal directories.
Click to hide internal directories.