errmetrics

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Files = map[uint8]string{
	1:  "bpf_cgtracker.c",
	2:  "bpf_cgroup_mkdir.c",
	3:  "bpf_enforcer.h",
	4:  "bpf_alignchecker.c",
	5:  "retprobe_map.h",
	6:  "generic_path.h",
	7:  "bpf_generic_tracepoint.c",
	8:  "process.h",
	9:  "bpf_execve_event.c",
	10: "uprobe_offload.h",
}

Keep in sync with bpf/errmetrics/fileids.h.

View Source
var (
	MapName = "tg_errmetrics_map"
)

Functions

func BPFFileName added in v1.6.0

func BPFFileName(id uint8) string

func GetErrorMessage added in v1.4.0

func GetErrorMessage(err uint16) (message string)

func NewErrorMetricsCollector added in v1.6.0

func NewErrorMetricsCollector() prometheus.Collector

Types

type DumpEntry

type DumpEntry struct {
	HelperFunc string `json:"helper_func,omitempty"`
	FileName   string `json:"file_name,omitempty"`
	LineNumber uint16 `json:"line_numer,omitempty"`
	ErrorName  string `json:"error_name,omitempty"`
	Error      uint16 `json:"error,omitempty"`
	Count      int    `json:"count,omitempty"`
}

type Map

type Map struct {
	*ebpf.Map
}

func OpenMap

func OpenMap(fname string) (Map, error)

func (Map) Dump

func (m Map) Dump() ([]DumpEntry, error)

type MapKey

type MapKey struct {
	Err      uint16
	FileID   uint8
	Pad1     uint8
	LineNR   uint16
	Pad2     uint16
	HelperID uint32
}

NB: should match bpf/lib/bpf_errmetrics.h:errmetrics_key

type MapVal

type MapVal = uint32

Jump to

Keyboard shortcuts

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