Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var MetricList = []string{
"api_booking_service_request_count",
"api_booking_service_request_latency_microseconds",
"go_gc_duration_seconds",
"go_goroutines",
"go_memstats_alloc_bytes",
"go_memstats_alloc_bytes_total",
"go_memstats_buck_hash_sys_bytes",
"go_memstats_frees_total",
"go_memstats_gc_sys_bytes",
"go_memstats_heap_alloc_bytes",
"go_memstats_heap_idle_bytes",
"go_memstats_heap_inuse_bytes",
"go_memstats_heap_objects",
"go_memstats_heap_released_bytes_total",
"go_memstats_heap_sys_bytes",
"go_memstats_last_gc_time_seconds",
"go_memstats_lookups_total",
"go_memstats_mallocs_total",
"go_memstats_mcache_inuse_bytes",
"go_memstats_mcache_sys_bytes",
"go_memstats_mspan_inuse_bytes",
"go_memstats_mspan_sys_bytes",
"go_memstats_next_gc_bytes",
"go_memstats_other_sys_bytes",
"go_memstats_stack_inuse_bytes",
"go_memstats_stack_sys_bytes",
"go_memstats_sys_bytes",
"http_request_duration_microseconds",
"http_request_size_bytes",
"http_requests_total",
"http_response_size_bytes",
"process_cpu_seconds_total",
"process_max_fds",
"process_open_fds",
"process_resident_memory_bytes",
"process_start_time_seconds",
"process_virtual_memory_bytes",
}
MetricList list of metrics from go-kit
var MultiGroupsMetricList = []string{
"api_booking_service_request_count",
"api_booking_service_request_latency_microseconds",
}
MultiGroupsMetricList list of metrics that needs an extra "total" tag
Functions ¶
This section is empty.
Types ¶
type CacheType ¶
type CacheType struct {
CounterType map[string]CounterCache `json:"counterType"`
}
Cache the structure of json file for cache
func (CacheType) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (CacheType) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*CacheType) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*CacheType) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type CounterCache ¶
type CounterCache struct {
Pre float64 `json:"pre"`
}
CounterCache struct to store counter type data
func (CounterCache) MarshalEasyJSON ¶
func (v CounterCache) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (CounterCache) MarshalJSON ¶
func (v CounterCache) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*CounterCache) UnmarshalEasyJSON ¶
func (v *CounterCache) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*CounterCache) UnmarshalJSON ¶
func (v *CounterCache) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type GodddCollector ¶
type GodddCollector struct { Downloader MetricsDownloader // contains filtered or unexported fields }
GodddCollector struct
func (*GodddCollector) CollectMetrics ¶
CollectMetrics will be called by Snap when a task that collects one of the metrics returned from this plugins
func (*GodddCollector) GetMetricTypes ¶
GetMetricTypes returns metric types for testing
type HTTPMetricsDownloader ¶
type HTTPMetricsDownloader struct { }
func (HTTPMetricsDownloader) GetEndpoint ¶
func (downloader HTTPMetricsDownloader) GetEndpoint(config snap.Config) (string, error)
func (HTTPMetricsDownloader) GetMetricsReader ¶
func (downloader HTTPMetricsDownloader) GetMetricsReader(url string) (io.Reader, error)
type LabelStruct ¶
LabelStruct smallest unit of label of metric
func (LabelStruct) MarshalEasyJSON ¶
func (v LabelStruct) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (LabelStruct) MarshalJSON ¶
func (v LabelStruct) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*LabelStruct) UnmarshalEasyJSON ¶
func (v *LabelStruct) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*LabelStruct) UnmarshalJSON ¶
func (v *LabelStruct) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type MetricsDownloader ¶
type Summary ¶
type Summary struct { SampleCount uint64 `json:"sampleCount"` SampleSum float64 `json:"sampleSum"` Quantile050 float64 `json:"quantile050"` Quantile090 float64 `json:"quantile090"` Quantile099 float64 `json:"quantile099"` Label []*LabelStruct `json:"label"` }
Summary a container to encode the summary type's metric from goddd / go-kit
func (Summary) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Summary) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Summary) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Summary) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface