errormetrics

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
		Namespace:   consts.MetricsNamespace,
		Name:        "errors_total",
		Help:        "The total number of Tetragon errors. For internal use only.",
		ConstLabels: nil,
	}, []string{"type"})

	HandlerErrors = prometheus.NewCounterVec(prometheus.CounterOpts{
		Namespace:   consts.MetricsNamespace,
		Name:        "handler_errors_total",
		Help:        "The total number of event handler errors. For internal use only.",
		ConstLabels: nil,
	}, []string{"opcode", "error_type"})
)

Functions

func ErrorTotalInc

func ErrorTotalInc(er ErrorType)

Increment an ErrorTotal for an ErrorType

func GetErrorTotal

func GetErrorTotal(er ErrorType) prometheus.Counter

Get a new handle on an ErrorTotal metric for an ErrorType

func GetHandlerErrors added in v0.8.3

func GetHandlerErrors(opcode ops.OpCode, er EventHandlerError) prometheus.Counter

Get a new handle on the HandlerErrors metric

func HandlerErrorsInc added in v0.8.3

func HandlerErrorsInc(opcode ops.OpCode, er EventHandlerError)

Increment the HandlerErrors metric

func InitMetrics added in v0.11.0

func InitMetrics(registry *prometheus.Registry)

Types

type ErrorType

type ErrorType int
const (
	// Process not found on get() call.
	ProcessCacheMissOnGet ErrorType = iota
	// Process evicted from the cache.
	ProcessCacheEvicted
	// Process not found on remove() call.
	ProcessCacheMissOnRemove
	// Tid and Pid mismatch that could affect BPF and user space caching logic
	ProcessPidTidMismatch
	// An event is missing process info.
	EventMissingProcessInfo
	// An error occurred in an event handler.
	HandlerError
	// An event finalizer on Process failed
	EventFinalizeProcessInfoFailed
)

func (ErrorType) String added in v1.1.0

func (e ErrorType) String() string

type EventHandlerError added in v1.1.0

type EventHandlerError int
const (
	HandlePerfUnknownOp EventHandlerError = iota
	HandlePerfHandlerError
)

TODO: Recognize different errors returned by individual handlers

func (EventHandlerError) String added in v1.1.0

func (e EventHandlerError) String() string

Jump to

Keyboard shortcuts

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