errormetrics

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 5 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()

func RegisterMetrics added in v1.2.0

func RegisterMetrics(group metrics.Group)

Types

type ErrorType

type ErrorType int
const (
	// Tid and Pid mismatch that could affect BPF and user space caching logic
	ProcessPidTidMismatch ErrorType = iota
	// An event finalizer on Process failed
	EventFinalizeProcessInfoFailed
	// Failed to resolve Process uid to username
	ProcessMetadataUsernameFailed
	// The username resolution was skipped since the process is not in host
	// namespaces.
	ProcessMetadataUsernameIgnoredNotInHost
)

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