metrics

package
v0.22.5 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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 (c *Collector[K]) Description() string

func (*Collector[K]) GaugeVec added in v0.22.5

func (c *Collector[K]) GaugeVec() *prometheus.GaugeVec

func (*Collector[K]) Get added in v0.22.5

func (c *Collector[K]) Get(k K) (uint64, bool)

func (*Collector[K]) Reset added in v0.22.5

func (c *Collector[K]) Reset()

func (*Collector[K]) Set added in v0.22.5

func (c *Collector[K]) Set(k K, v uint64)

func (*Collector[K]) Total added in v0.22.5

func (c *Collector[K]) Total() uint64

func (*Collector[K]) Values added in v0.22.5

func (c *Collector[K]) Values() map[K]uint64

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) Get added in v0.22.5

func (ec *EventCollector) Get(id events.ID) uint64

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) Set added in v0.22.5

func (ec *EventCollector) Set(id events.ID, v uint64)

func (*EventCollector) Total added in v0.22.5

func (ec *EventCollector) Total() uint64

func (*EventCollector) Values added in v0.22.5

func (ec *EventCollector) Values() map[events.ID]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 NewStats added in v0.22.5

func NewStats() *Stats

func (*Stats) RegisterPrometheus added in v0.8.0

func (stats *Stats) RegisterPrometheus() error

Register Stats to prometheus metrics exporter

Jump to

Keyboard shortcuts

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