Documentation
¶
Index ¶
- type BPFPerfEventCollector
- type BPFPerfEventStats
- type ChannelMetrics
- 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) MarshalJSON() ([]byte, error)
- 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 BPFPerfEventCollector ¶ added in v0.24.0
type BPFPerfEventCollector struct {
// contains filtered or unexported fields
}
BPFPerfEventCollector is a custom Prometheus collector that reads from BPF maps on-demand
func NewBPFPerfEventCollector ¶ added in v0.24.0
func NewBPFPerfEventCollector(perfEventStatsMap *bpf.BPFMap) *BPFPerfEventCollector
NewBPFPerfEventCollector creates a new on-demand BPF perf event collector
func (*BPFPerfEventCollector) Collect ¶ added in v0.24.0
func (c *BPFPerfEventCollector) Collect(ch chan<- prometheus.Metric)
Collect implements prometheus.Collector - this is called when Prometheus scrapes
func (*BPFPerfEventCollector) Describe ¶ added in v0.24.0
func (c *BPFPerfEventCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements prometheus.Collector
type BPFPerfEventStats ¶ added in v0.24.0
BPFPerfEventStats holds the BPF perf event stats
type ChannelMetrics ¶ added in v0.24.0
func (ChannelMetrics[T]) MarshalJSON ¶ added in v0.24.0
func (m ChannelMetrics[T]) MarshalJSON() ([]byte, error)
func (ChannelMetrics[T]) RegisterChannels ¶ added in v0.24.0
func (m ChannelMetrics[T]) RegisterChannels() error
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) MarshalJSON ¶ added in v0.23.0
func (ec *EventCollector) MarshalJSON() ([]byte, error)
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 `json:"EventCount"`
EventsFiltered *counter.Counter `json:"EventsFiltered"`
NetCapCount *counter.Counter `json:"NetCapCount"` // network capture events
BPFLogsCount *counter.Counter `json:"BPFLogsCount"`
ErrorCount *counter.Counter `json:"ErrorCount"`
LostEvCount *counter.Counter `json:"LostEvCount"`
LostWrCount *counter.Counter `json:"LostWrCount"`
LostNtCapCount *counter.Counter `json:"LostNtCapCount"` // lost network capture events
LostBPFLogsCount *counter.Counter `json:"LostBPFLogsCount"`
Channels ChannelMetrics[*trace.Event] `json:"ChannelMetrics"`
// contains filtered or unexported fields
}
When updating this struct, please make sure to update the relevant exporting functions
func (*Stats) GetBPFPerfEventStats ¶ added in v0.24.0
func (s *Stats) GetBPFPerfEventStats() BPFPerfEventStats
GetBPFPerfEventStats returns the BPF perf event stats
func (*Stats) MarshalJSON ¶ added in v0.23.0
func (*Stats) RegisterPrometheus ¶ added in v0.8.0
Register Stats to prometheus metrics exporter
func (*Stats) SetPerfEventStatsMap ¶ added in v0.24.0
SetPerfEventStatsMap sets the BPF map for on-demand perf event stats collection
Click to show internal directories.
Click to hide internal directories.