Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNilConfig = errors.New("config is nil")
ErrNilConfig is returned if Init is called on a nil Config
Functions ¶
This section is empty.
Types ¶
type PrometheusSink ¶
PrometheusSink represents prometheus sink and prometheus stats endpoint configuration
func (*PrometheusSink) Finalize ¶
func (p *PrometheusSink) Finalize() error
Unregisters prometheus sink and stops prometheus stats endpoint
func (*PrometheusSink) Init ¶
func (p *PrometheusSink) Init() (metrics.MetricSink, error)
Creates a new prometheus sink from config and starts a goroutine with prometheus stats endpoint
type Sink ¶
type Sink interface {
Init() (metrics.MetricSink, error)
Finalize() error
}
Every sink should implement this interface
type Sinks ¶
type Sinks struct {
Inmem *InmemSink
Statsd *StatsdSink
Statsite *StatsiteSink
Prometheus *PrometheusSink
}
Sinks represent sinks configuration
type StatsdSink ¶
type StatsdSink struct {
Addr string
}
StatsdSink represents statsd sink configuration
func (*StatsdSink) Init ¶
func (s *StatsdSink) Init() (metrics.MetricSink, error)
Creates a new statsd sink from config
type StatsiteSink ¶
type StatsiteSink struct {
Addr string
}
StatsiteSink represents statsite sink configuration
func (*StatsiteSink) Init ¶
func (s *StatsiteSink) Init() (metrics.MetricSink, error)
Creates a new statsite sink from config
type Telemetry ¶
type Telemetry struct {
Enabled bool
ServiceName string `toml:"service_name"`
HostName string
EnableHostname bool `toml:"enable_hostname"`
EnableHostnameLabel bool `toml:"enable_hostname_label"`
EnableRuntimeMetrics bool `toml:"enable_runtime_metrics"`
Sinks Sinks
}
Telemetry represents telemetry configuration
Click to show internal directories.
Click to hide internal directories.