stats

package
v0.0.0-...-0611383 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package stats uses uber-go/tally for reporting hierarchical stats. Tally supports multiple sinks including prometheus, m3, and statsd. xds-relay currently defaults to statsd, but this will be made configurable in the future to support the other sink alternatives.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMockScope

func NewMockScope(prefix string) tally.TestScope

NewMockScope mocks a stats scope for testing.

func NewRootScope

func NewRootScope(config Config) (tally.Scope, io.Closer, error)

NewRootScope creates a new root Scope with the set of configured options and statsd reporter.

func NewStatsdPointTagsReporter

func NewStatsdPointTagsReporter(statsdClient statsd.Statter) tally.StatsReporter

Types

type Config

type Config struct {
	// StatsdAddress that the statsd sink is running on, with format addr:port.
	StatsdAddress string
	// RootPrefix is the prefix for the root scope.
	RootPrefix string
	// The maximum interval for packet sending. If set to 0 it defaults to 300ms.
	FlushInterval time.Duration
}

Config holds the configuration options for stats reporting.

Jump to

Keyboard shortcuts

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