Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TallyFlushInterval is the flush interval for metrics buffered in Tally to // be flushed to the backend TallyFlushInterval = 1 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func InitMetricScope ¶
func InitMetricScope( cfg *Config, rootMetricScope string, metricFlushInterval time.Duration) (tally.Scope, io.Closer, *nethttp.ServeMux)
InitMetricScope initialize a root scope and its closer, with a http server mux
func SafeScopeName ¶
SafeScopeName returns a safe scope name that removes dash which is not allowed in tally
Types ¶
type Config ¶
type Config struct { MultiReporter bool `yaml:"multi_reporter"` Prometheus *prometheusConfig `yaml:"prometheus"` Statsd *statsdConfig `yaml:"statsd"` M3 *tallym3.Configuration `yaml:"m3"` RuntimeMetrics *runtimeConfig `yaml:"runtime_metrics"` }
Config will be containing the metrics configuration
type RuntimeCollector ¶
type RuntimeCollector struct {
// contains filtered or unexported fields
}
RuntimeCollector is a struct containing the state of the runtimeMetrics.
func NewRuntimeCollector ¶
func NewRuntimeCollector(scope tally.Scope, collectInterval time.Duration) *RuntimeCollector
NewRuntimeCollector creates a new RuntimeCollector.
func (*RuntimeCollector) IsRunning ¶
func (r *RuntimeCollector) IsRunning() bool
IsRunning returns true if the collector has been started and false if not.
func (*RuntimeCollector) Start ¶
func (r *RuntimeCollector) Start()
Start starts the collector thread that periodically emits metrics.
Click to show internal directories.
Click to hide internal directories.