noop

package
v0.0.0-...-5c235e3 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sink

type Sink struct {
	// contains filtered or unexported fields
}

Sink describes a no-op sink

func New

func New(log *zap.SugaredLogger) Sink

New ...

func (Sink) Close

func (n Sink) Close() error

Close returns nil

func (Sink) GetPrefix

func (n Sink) GetPrefix() string

GetPrefix returns the prefix used when sending metrics to datadog

func (Sink) GetSinkName

func (n Sink) GetSinkName() string

GetSinkName returns the name of the sink

func (Sink) MetricCleaned

func (n Sink) MetricCleaned(succeed bool, kind string, tags []string) error

MetricCleaned is used by the chaos-injector to indicate an injector has cleaned the disruptions from the target, and does not intend to re-inject.

func (Sink) MetricCleanedForReinjection

func (n Sink) MetricCleanedForReinjection(succeed bool, kind string, tags []string) error

MetricCleanedForReinjection is used by the chaos-injector to indicate an injector has cleaned the disruptions from the target, but expects to reinject, i.e., when using the spec.pulse feature

func (Sink) MetricCleanupDuration

func (n Sink) MetricCleanupDuration(duration time.Duration, tags []string) error

MetricCleanupDuration indicates the duration between a Disruption's deletion timestamp, and when the chaos-controller removes its finalizer

func (Sink) MetricDisruptionCompletedDuration

func (n Sink) MetricDisruptionCompletedDuration(duration time.Duration, tags []string) error

MetricDisruptionCompletedDuration indicates the duration between a Disruption's creation timestamp, and when the chaos-controller removes its finalizer

func (Sink) MetricDisruptionOngoingDuration

func (n Sink) MetricDisruptionOngoingDuration(duration time.Duration, tags []string) error

MetricDisruptionOngoingDuration indicates the duration between a Disruption's creation timestamp, and the current time. This is emitted approximately every one minute

func (Sink) MetricDisruptionScheduled

func (n Sink) MetricDisruptionScheduled(tags []string) error

MetricDisruptionScheduled reports when a new disruption is scheduled

func (Sink) MetricDisruptionsCount

func (n Sink) MetricDisruptionsCount(kind chaostypes.DisruptionKindName, tags []string) error

MetricDisruptionsCount counts finished disruptions, and tags the disruption kind

func (Sink) MetricDisruptionsGauge

func (n Sink) MetricDisruptionsGauge(gauge float64, tags []string) error

MetricDisruptionsGauge is emitted once per minute counting the total number of ongoing disruptions per namespace, or if we fail to determine the namespaced metrics, simply the total number of disruptions found

func (Sink) MetricInformed

func (n Sink) MetricInformed(tags []string) error

MetricInformed is emitted every time the manager container's informer is called to check a pod in the chaos-controller's namespace, to see if that pod is a chaos-injector pod that needs its Disruption reconciled.

func (Sink) MetricInjectDuration

func (n Sink) MetricInjectDuration(duration time.Duration, tags []string) error

MetricInjectDuration indicates the duration between a Disruption's creation timestamp, and when it reaches a status of Injected, indicating all chaos-injector pods have injected into their targets, and we've reached the expected count

func (Sink) MetricInjected

func (n Sink) MetricInjected(succeed bool, kind string, tags []string) error

MetricInjected is used by the chaos-injector to indicate it has finished trying to inject the disruption into the target, the `succeed` bool argument is false if there was an error while injecting.

func (Sink) MetricMissingTargetDeleted

func (n Sink) MetricMissingTargetDeleted(tags []string) error

MetricMissingTargetDeleted reports when a scheduled Disruption has been deleted by the chaos-controller, because its target has been missing for too long

func (Sink) MetricMissingTargetFound

func (n Sink) MetricMissingTargetFound(tags []string) error

MetricMissingTargetFound reports when a scheduled Disruption which had initially been deemed missing is "found" and running in the kubernetes namespace

func (Sink) MetricNextScheduledTime

func (n Sink) MetricNextScheduledTime(duration time.Duration, tags []string) error

MetricNextScheduledTime reports the duration until the next scheduled disruption will run

func (Sink) MetricOrphanFound

func (n Sink) MetricOrphanFound(tags []string) error

MetricOrphanFound increments when a chaos pod without a corresponding disruption resource is found

func (Sink) MetricPausedCron

func (n Sink) MetricPausedCron(tags []string) error

MetricPausedCron reports when a disruption cron has reconciled in a paused state

func (Sink) MetricPodsCreated

func (n Sink) MetricPodsCreated(target, instanceName, namespace string, succeed bool) error

MetricPodsCreated is used every time the chaos-controller finishes sending a Create request to the k8s api to schedule a new chaos-injector pod. The `succeed` bool argument is false if there was an error returned.

func (Sink) MetricPodsGauge

func (n Sink) MetricPodsGauge(gauge float64) error

MetricPodsGauge is emitted once per minute counting the total number of live chaos pods for all ongoing disruptions

func (Sink) MetricReconcile

func (n Sink) MetricReconcile() error

MetricReconcile is used to count how many times the controller enters any reconcile loop

func (Sink) MetricReconcileDuration

func (n Sink) MetricReconcileDuration(duration time.Duration, tags []string) error

MetricReconcileDuration is used at the end of every reconcile loop to indicate the duration that Reconcile() call spent

func (Sink) MetricReinjected

func (n Sink) MetricReinjected(succeed bool, kind string, tags []string) error

MetricReinjected is used by the chaos-injector to indicate it has finished trying to inject the disruption into the target, the `succeed` bool argument is false if there was an error while injecting. This metric is used instead of MetricInjected if the chaos-injector pod is performing any injection after its first, i.e., when using the pulse feature

func (Sink) MetricRestart

func (n Sink) MetricRestart() error

MetricRestart is emitted once, every time the manager container of the chaos-controller starts up

func (Sink) MetricStuckOnRemoval

func (n Sink) MetricStuckOnRemoval(tags []string) error

MetricStuckOnRemoval is emitted once per minute per disruption, if that disruption is "stuck on removal", i.e., we have attempted to clean and delete the disruption, but that has not worked, and a human needs to intervene.

func (Sink) MetricStuckOnRemovalGauge

func (n Sink) MetricStuckOnRemovalGauge(gauge float64) error

MetricStuckOnRemovalGauge is emitted once per minute counting the total number of disruptions that are "stuck on removal", i.e., we have attempted to clean and delete the disruption, but that has not worked, and a human needs to intervene.

func (Sink) MetricTargetMissing

func (n Sink) MetricTargetMissing(duration time.Duration, tags []string) error

MetricTargetMissing reports when a scheduled Disruption can not find its specific target either for the first time or multiple times. A deletion occurs on the final alert

func (Sink) MetricTooLate

func (n Sink) MetricTooLate(tags []string) error

MetricTooLate reports when a scheduled Disruption misses its configured time to be run, specific to cron and rollout controllers

func (Sink) MetricValidationCreated

func (n Sink) MetricValidationCreated(tags []string) error

MetricValidationCreated is emitted once per created Disruption, in the webhook after validation completes.

func (Sink) MetricValidationDeleted

func (n Sink) MetricValidationDeleted(tags []string) error

MetricValidationDeleted is emitted once per Disruption delete, in the webhook

func (Sink) MetricValidationFailed

func (n Sink) MetricValidationFailed(tags []string) error

MetricValidationFailed is emitted in ValidateCreate and ValidateUpdate in the disruption_webhook, specifically and only when DisruptionSpec.Validate() returns an error, OR when trying to remove the finalizer from a disruption with chaos pods

func (Sink) MetricValidationUpdated

func (n Sink) MetricValidationUpdated(tags []string) error

MetricValidationUpdated is emitted once per Disruption update, in the webhook after validation completes

func (Sink) MetricWatcherCalls

func (n Sink) MetricWatcherCalls(tags []string) error

MetricWatcherCalls is a counter of watcher calls. This is emitted by every OnChange event for all of our watchers, e.g., the chaos pod watcher, the target pod watcher, the disruption watcher.

Jump to

Keyboard shortcuts

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