Documentation
¶
Index ¶
- type ActionType
- type MatchType
- type MetricMapper
- func (m *MetricMapper) GetMapping(statsdMetric string, statsdMetricType MetricType) (*MetricMapping, prometheus.Labels, bool)
- func (m *MetricMapper) InitCache(cacheSize int)
- func (m *MetricMapper) InitFromFile(fileName string, cacheSize int) error
- func (m *MetricMapper) InitFromYAMLString(fileContents string, cacheSize int) error
- type MetricMapperCache
- type MetricMapperCacheResult
- type MetricMapperLRUCache
- type MetricMapperNoopCache
- type MetricMapping
- type MetricType
- type TimerType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionType ¶
type ActionType string
const ( ActionTypeMap ActionType = "map" ActionTypeDrop ActionType = "drop" ActionTypeDefault ActionType = "" )
func (*ActionType) UnmarshalYAML ¶
func (t *ActionType) UnmarshalYAML(unmarshal func(interface{}) error) error
type MetricMapper ¶
type MetricMapper struct {
Defaults mapperConfigDefaults `yaml:"defaults"`
Mappings []MetricMapping `yaml:"mappings"`
FSM *fsm.FSM
MappingsCount prometheus.Gauge
// contains filtered or unexported fields
}
func (*MetricMapper) GetMapping ¶
func (m *MetricMapper) GetMapping(statsdMetric string, statsdMetricType MetricType) (*MetricMapping, prometheus.Labels, bool)
func (*MetricMapper) InitCache ¶ added in v0.10.1
func (m *MetricMapper) InitCache(cacheSize int)
func (*MetricMapper) InitFromFile ¶
func (m *MetricMapper) InitFromFile(fileName string, cacheSize int) error
func (*MetricMapper) InitFromYAMLString ¶
func (m *MetricMapper) InitFromYAMLString(fileContents string, cacheSize int) error
type MetricMapperCache ¶ added in v0.10.1
type MetricMapperCache interface {
Get(metricString string) (*MetricMapperCacheResult, bool)
AddMatch(metricString string, mapping *MetricMapping, labels prometheus.Labels)
AddMiss(metricString string)
}
type MetricMapperCacheResult ¶ added in v0.10.1
type MetricMapperCacheResult struct {
Mapping *MetricMapping
Matched bool
Labels prometheus.Labels
}
type MetricMapperLRUCache ¶ added in v0.10.1
type MetricMapperLRUCache struct {
MetricMapperCache
// contains filtered or unexported fields
}
func NewMetricMapperCache ¶ added in v0.10.1
func NewMetricMapperCache(size int) (*MetricMapperLRUCache, error)
func (*MetricMapperLRUCache) AddMatch ¶ added in v0.10.1
func (m *MetricMapperLRUCache) AddMatch(metricString string, mapping *MetricMapping, labels prometheus.Labels)
func (*MetricMapperLRUCache) AddMiss ¶ added in v0.10.1
func (m *MetricMapperLRUCache) AddMiss(metricString string)
func (*MetricMapperLRUCache) Get ¶ added in v0.10.1
func (m *MetricMapperLRUCache) Get(metricString string) (*MetricMapperCacheResult, bool)
type MetricMapperNoopCache ¶ added in v0.10.1
type MetricMapperNoopCache struct {
MetricMapperCache
}
func NewMetricMapperNoopCache ¶ added in v0.10.1
func NewMetricMapperNoopCache() *MetricMapperNoopCache
func (*MetricMapperNoopCache) AddMatch ¶ added in v0.10.1
func (m *MetricMapperNoopCache) AddMatch(metricString string, mapping *MetricMapping, labels prometheus.Labels)
func (*MetricMapperNoopCache) AddMiss ¶ added in v0.10.1
func (m *MetricMapperNoopCache) AddMiss(metricString string)
func (*MetricMapperNoopCache) Get ¶ added in v0.10.1
func (m *MetricMapperNoopCache) Get(metricString string) (*MetricMapperCacheResult, bool)
type MetricMapping ¶
type MetricMapping struct {
Match string `yaml:"match"`
Name string `yaml:"name"`
Labels prometheus.Labels `yaml:"labels"`
TimerType TimerType `yaml:"timer_type"`
Buckets []float64 `yaml:"buckets"`
Quantiles []metricObjective `yaml:"quantiles"`
MatchType MatchType `yaml:"match_type"`
HelpText string `yaml:"help"`
Action ActionType `yaml:"action"`
MatchMetricType MetricType `yaml:"match_metric_type"`
Ttl time.Duration `yaml:"ttl"`
// contains filtered or unexported fields
}
type MetricType ¶
type MetricType string
const ( MetricTypeCounter MetricType = "counter" MetricTypeGauge MetricType = "gauge" MetricTypeTimer MetricType = "timer" )
func (*MetricType) UnmarshalYAML ¶
func (m *MetricType) UnmarshalYAML(unmarshal func(interface{}) error) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.