errmetrics

package
v1.4.0-pre.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const UnknownFname = "<unknown>"

Variables

View Source
var GetFileIDs = sync.OnceValues(func() (map[int]string, error) {
	var entries []Entry
	if err := json.Unmarshal(fileIDsJSON, &entries); err != nil {
		return nil, err
	}

	ret := map[int]string{}
	for _, e := range entries {
		ret[e.ID] = e.Filename
	}
	return ret, nil
})
View Source
var (
	MapName = "tg_errmetrics_map"
)

Functions

This section is empty.

Types

type DumpEntry

type DumpEntry struct {
	Location string
	Error    string
	Count    int
}

type Entry

type Entry struct {
	ID       int    `json:"id"`
	Filename string `json:"filename"`
}

json entry

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
}

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