errormetrics

package
v1.1.0-pre.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 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(t ErrorType)

Increment an ErrorTotal for an ErrorType

func GetErrorTotal

func GetErrorTotal(t ErrorType) prometheus.Counter

Get a new handle on an ErrorTotal metric for an ErrorType

func GetHandlerErrors added in v0.8.3

func GetHandlerErrors(opcode int, err error) prometheus.Counter

Get a new handle on the HandlerErrors metric

func HandlerErrorsInc added in v0.8.3

func HandlerErrorsInc(opcode int, err error)

Increment the HandlerErrors metric

func InitMetrics added in v0.11.0

func InitMetrics(registry *prometheus.Registry)

Types

type ErrorType

type ErrorType string
var (
	// Process not found on get() call.
	ProcessCacheMissOnGet ErrorType = "process_cache_miss_on_get"
	// Process evicted from the cache.
	ProcessCacheEvicted ErrorType = "process_cache_evicted"
	// Process not found on remove() call.
	ProcessCacheMissOnRemove ErrorType = "process_cache_miss_on_remove"
	// Tid and Pid mismatch that could affect BPF and user space caching logic
	ProcessPidTidMismatch ErrorType = "process_pid_tid_mismatch"
	// Event cache podInfo retries failed.
	EventCachePodInfoRetryFailed ErrorType = "event_cache_podinfo_retry_failed"
	// Event cache failed to set process information for an event.
	EventCacheProcessInfoFailed ErrorType = "event_cache_process_info_failed"
	// Event cache failed to set parent information for an event.
	EventCacheParentInfoFailed ErrorType = "event_cache_parent_info_failed"
	// An event is missing process info.
	EventMissingProcessInfo ErrorType = "event_missing_process_info"
	// An error occurred in an event handler.
	HandlerError ErrorType = "handler_error"
	// An event finalizer on Process failed
	EventFinalizeProcessInfoFailed ErrorType = "event_finalize_process_info_failed"
)

Jump to

Keyboard shortcuts

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