Documentation ¶
Index ¶
- type Collector
- func (c *Collector[K]) Description() string
- func (c *Collector[K]) GaugeVec() *prometheus.GaugeVec
- func (c *Collector[K]) Get(k K) (uint64, bool)
- func (c *Collector[K]) Reset()
- func (c *Collector[K]) Set(k K, v uint64)
- func (c *Collector[K]) Total() uint64
- func (c *Collector[K]) Values() map[K]uint64
- type EventCollector
- func (ec *EventCollector) Description() string
- func (ec *EventCollector) GaugeVec() *prometheus.GaugeVec
- func (ec *EventCollector) Get(id events.ID) uint64
- func (ec *EventCollector) Log()
- func (ec *EventCollector) Reset()
- func (ec *EventCollector) Set(id events.ID, v uint64)
- func (ec *EventCollector) Total() uint64
- func (ec *EventCollector) Values() map[events.ID]uint64
- type Stats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶ added in v0.22.5
type Collector[K comparable] struct { // contains filtered or unexported fields }
func NewCollector ¶ added in v0.22.5
func NewCollector[K comparable](description string, gv *prometheus.GaugeVec) *Collector[K]
func (*Collector[K]) Description ¶ added in v0.22.5
func (*Collector[K]) GaugeVec ¶ added in v0.22.5
func (c *Collector[K]) GaugeVec() *prometheus.GaugeVec
type EventCollector ¶ added in v0.22.5
type EventCollector struct {
// contains filtered or unexported fields
}
func NewEventCollector ¶ added in v0.22.5
func NewEventCollector(description string, gv *prometheus.GaugeVec) *EventCollector
func (*EventCollector) Description ¶ added in v0.22.5
func (ec *EventCollector) Description() string
func (*EventCollector) GaugeVec ¶ added in v0.22.5
func (ec *EventCollector) GaugeVec() *prometheus.GaugeVec
func (*EventCollector) Log ¶ added in v0.22.5
func (ec *EventCollector) Log()
func (*EventCollector) Reset ¶ added in v0.22.5
func (ec *EventCollector) Reset()
func (*EventCollector) Total ¶ added in v0.22.5
func (ec *EventCollector) Total() uint64
type Stats ¶
type Stats struct { EventCount counter.Counter EventsFiltered counter.Counter NetCapCount counter.Counter // network capture events BPFLogsCount counter.Counter ErrorCount counter.Counter LostEvCount counter.Counter LostWrCount counter.Counter LostNtCapCount counter.Counter // lost network capture events LostBPFLogsCount counter.Counter // NOTE: BPFPerfEventSubmit* metrics are periodically collected from the 'events_stats' // BPF map, while userspace metrics are continuously updated within the application // based on varying logic. Due to differences in data sources and collection timing, // the two sets of metrics are not directly synchronized. As a result, the total event // counts fetched from 'events_stats' may not align with those reported by userspace metrics. // Each metric set is designed to provide distinct insights and should be analyzed // independently, without direct comparison. BPFPerfEventSubmitAttemptsCount *EventCollector BPFPerfEventSubmitFailuresCount *EventCollector }
When updating this struct, please make sure to update the relevant exporting functions
func (*Stats) RegisterPrometheus ¶ added in v0.8.0
Register Stats to prometheus metrics exporter
Click to show internal directories.
Click to hide internal directories.