statsd

package
v0.0.0-...-8d187f3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricInc    = "Inc"
	MetricTiming = "Timing"
)

Variables

This section is empty.

Functions

func NewStatsdMonitor

func NewStatsdMonitor(cfg config.StatsdConfig)

Types

type CloudStatsd

type CloudStatsd struct {
	APICount map[string][]float64
	ResCount map[string][]float64
	APICost  map[string][]float64
}

func NewCloudStatsd

func NewCloudStatsd() CloudStatsd

func (*CloudStatsd) RefreshAPIMoniter

func (c *CloudStatsd) RefreshAPIMoniter(key string, count int, start time.Time)

type CloudTaskStatsd

type CloudTaskStatsd struct {
	TaskCost map[string][]float64
}

type GenesisStatsd

type GenesisStatsd struct {
	K8SInfoDelay map[string][]float64
}

type StatsdElement

type StatsdElement struct {
	// metric type (specified by a constant)
	MetricType string
	// clickhouse metrics field (if there is a configuration prefix, the prefix must be added)
	VirtualTableName string
	// use global tags
	UseGlobalTag bool
	// private tag key
	PrivateTagKey string
	// metrics float name to values
	MetricsFloatNameToValues map[string][]float64
}

func GetCloudStatsd

func GetCloudStatsd(cloud CloudStatsd) []StatsdElement

func GetCloudTaskStatsd

func GetCloudTaskStatsd(cloud CloudTaskStatsd) []StatsdElement

func GetGenesisStatsd

func GetGenesisStatsd(genesis GenesisStatsd) []StatsdElement

type StatsdMonitor

type StatsdMonitor struct {
	// contains filtered or unexported fields
}
var MetaStatsd *StatsdMonitor

func (*StatsdMonitor) RegisterStatsdTable

func (s *StatsdMonitor) RegisterStatsdTable(stable Statsdtable)

func (*StatsdMonitor) Send

func (s *StatsdMonitor) Send(data *pb.Stats) error

type StatsdStatter

type StatsdStatter struct {
	OrgID      int
	TeamID     int
	Element    []StatsdElement
	GlobalTags map[string]string
}

type Statsdtable

type Statsdtable interface {
	GetStatter() StatsdStatter
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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