Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Name string `yaml:"name"`
Metrics Metrics `yaml:"metrics"`
Tracing Tracing `yaml:"tracing"`
Kaddrs []string `yaml:"kaddrs"`
BPFPath string
}
Config describes how to configure and extract metrics
type Counter ¶
type Counter struct {
Name string `yaml:"name"`
Help string `yaml:"help"`
PerfEventArray bool `yaml:"perf_event_array"`
FlushInterval time.Duration `yaml:"flush_interval"`
Labels []Label `yaml:"labels"`
}
Counter is a metric defining prometheus counter
type Decoder ¶
type Decoder struct {
Name string `yaml:"name"`
StaticMap map[string]string `yaml:"static_map"`
Regexps []string `yaml:"regexps"`
AllowUnknown bool `yaml:"allow_unknown"`
}
Decoder defines how to decode value
type Histogram ¶
type Histogram struct {
Name string `yaml:"name"`
Help string `yaml:"help"`
BucketType HistogramBucketType `yaml:"bucket_type"`
BucketMultiplier float64 `yaml:"bucket_multiplier"`
BucketMin int `yaml:"bucket_min"`
BucketMax int `yaml:"bucket_max"`
BucketKeys []float64 `yaml:"bucket_keys"`
Labels []Label `yaml:"labels"`
}
Histogram is a metric defining prometheus histogram
type HistogramBucketType ¶
type HistogramBucketType string
HistogramBucketType is an enum to define how to interpret histogram
const ( // HistogramBucketExp2 means histograms with power-of-two keys HistogramBucketExp2 HistogramBucketType = "exp2" // HistogramBucketExp2WithZero means histograms with power-of-two keys where the first key is for zero HistogramBucketExp2WithZero HistogramBucketType = "exp2zero" // HistogramBucketLinear means histogram with linear keys HistogramBucketLinear HistogramBucketType = "linear" // HistogramBucketFixed means histogram with fixed user-defined keys HistogramBucketFixed HistogramBucketType = "fixed" )
type Label ¶
type Label struct {
Name string `yaml:"name"`
Size uint `yaml:"size"`
Decoders []Decoder `yaml:"decoders"`
}
Label defines how to decode an element from eBPF map key with the list of decoders
type Metrics ¶
type Metrics struct {
Counters []Counter `yaml:"counters"`
Histograms []Histogram `yaml:"histograms"`
}
Metrics is a collection of metrics attached to a program
Click to show internal directories.
Click to hide internal directories.