Documentation
¶
Index ¶
- Constants
- Variables
- func ContextID(ctx context.Context) string
- func DelTotalCachedObjects(ctxID string, gvk schema.GroupVersionKind)
- func Enabled() bool
- func IncTotalCachedObjects(ctxID string, gvk schema.GroupVersionKind, count int)
- func IncTotalHandlerExecutions(controllerName, handlerName string, hasError bool)
- func MustRegister(registerer prometheus.Registerer)
- func MustRegisterWithWorkqueue(registerer prometheus.Registerer)
- func ReportReconcileTime(controllerName, handlerName string, hasError bool, observeTime float64)
- func WithContextID(ctx context.Context, id string) context.Context
Constants ¶
const ( WorkQueueSubsystem = "workqueue" DepthKey = "depth" AddsKey = "adds_total" QueueLatencyKey = "queue_duration_seconds" WorkDurationKey = "work_duration_seconds" UnfinishedWorkKey = "unfinished_work_seconds" LongestRunningProcessorKey = "longest_running_processor_seconds" RetriesKey = "retries_total" )
Metrics subsystem and all keys used by the workqueue.
Variables ¶
var ( TotalControllerExecutions = prometheus.NewCounterVec( prometheus.CounterOpts{ Subsystem: lassoSubsystem, Name: "total_handler_execution", Help: "Total count of handler executions", }, []string{controllerNameLabel, handlerNameLabel, hasErrorLabel}, ) TotalCachedObjects = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Subsystem: lassoSubsystem, Name: "total_cached_object", Help: "Total count of cached objects", }, []string{contextLabel, groupLabel, versionLabel, kindLabel}, ) )
Functions ¶
func ContextID ¶ added in v0.2.0
ContextID extracts the identifier previously set by WithContextID, returning an empty string otherwise
func DelTotalCachedObjects ¶ added in v0.2.0
func DelTotalCachedObjects(ctxID string, gvk schema.GroupVersionKind)
DelTotalCachedObjects deletes the cached items count metric matching the provided content and GroupVersionKind
func IncTotalCachedObjects ¶
func IncTotalCachedObjects(ctxID string, gvk schema.GroupVersionKind, count int)
IncTotalCachedObjects sets the cached items count for the specified context and GroupVersionKind
func MustRegister ¶ added in v0.2.0
func MustRegister(registerer prometheus.Registerer)
MustRegister registers only lasso-specific metrics. This must be used if attempting to register Lasso metrics to the same registerer as used by Kubernetes itself, otherwise prometheus will panic when both packages register metrics with the same name.
func MustRegisterWithWorkqueue ¶ added in v0.2.0
func MustRegisterWithWorkqueue(registerer prometheus.Registerer)
MustRegisterWithWorkqueue registers all metrics, including Kubernetes internal workqueue metrics, with the provided registerer
func ReportReconcileTime ¶
Types ¶
This section is empty.