metrics

package
v2.12.6 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SuccessTrue indicates that the operation was successful.
	SuccessTrue string = "true"
	// SuccessFalse indicates that the operation was not successful.
	SuccessFalse string = "false"

	// SuccessKey defines the key of the metric label indicating success/failure of an operation.
	SuccessKey string = "success"
)
View Source
const (
	// ProtocolDBLess indicates that configuration was sent to Kong using the DB-less protocol (POST /config).
	ProtocolDBLess Protocol = "db-less"
	// ProtocolDeck indicates that configuration was sent to Kong using the DB mode protocol (deck sync).
	ProtocolDeck Protocol = "deck"

	// ProtocolKey defines the key of the metric label indicating which protocol KIC used to configure Kong.
	ProtocolKey string = "protocol"
)
View Source
const (
	// FailureReasonConflict indicates that the config push failed due to configuration conflicts.
	FailureReasonConflict string = "conflict"

	// FailureReasonNetwork indicates that the config push failed due to network issues.
	FailureReasonNetwork string = "network"

	// FailureReasonOther indicates that the config push failed due to other reasons.
	FailureReasonOther string = "other"

	// FailureReasonKey defines the key of the metric label indicating failure reason.
	FailureReasonKey string = "failure_reason"
)
View Source
const (
	MetricNameConfigPushCount            = "ingress_controller_configuration_push_count"
	MetricNameConfigPushBrokenResources  = "ingress_controller_configuration_push_broken_resource_count"
	MetricNameConfigPushSuccessTime      = "ingress_controller_configuration_push_last_successful"
	MetricNameTranslationCount           = "ingress_controller_translation_count"
	MetricNameTranslationBrokenResources = "ingress_controller_translation_broken_resource_count"
	MetricNameConfigPushDuration         = "ingress_controller_configuration_push_duration_milliseconds"
)
View Source
const (
	// DataplaneKey defines the name of the metric label indicating which dataplane this time series is relevant for.
	DataplaneKey string = "dataplane"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CtrlFuncMetrics

type CtrlFuncMetrics struct {
	ConfigPushCount *prometheus.CounterVec

	ConfigPushBrokenResources *prometheus.GaugeVec

	TranslationCount *prometheus.CounterVec

	TranslationBrokenResources prometheus.Gauge

	ConfigPushDuration *prometheus.HistogramVec

	ConfigPushSuccessTime *prometheus.GaugeVec
}

func NewCtrlFuncMetrics

func NewCtrlFuncMetrics() *CtrlFuncMetrics

func (*CtrlFuncMetrics) RecordPushFailure added in v2.9.0

func (c *CtrlFuncMetrics) RecordPushFailure(p Protocol, d time.Duration, dataplane string, count int, err error)

RecordPushFailure records a failed configuration push.

func (*CtrlFuncMetrics) RecordPushSuccess added in v2.9.0

func (c *CtrlFuncMetrics) RecordPushSuccess(p Protocol, d time.Duration, dataplane string)

RecordPushSuccess records a successful configuration push.

func (*CtrlFuncMetrics) RecordTranslationBrokenResources added in v2.11.0

func (c *CtrlFuncMetrics) RecordTranslationBrokenResources(count int)

RecordTranslationBrokenResources records the number of resources failing translation.

func (*CtrlFuncMetrics) RecordTranslationFailure added in v2.9.0

func (c *CtrlFuncMetrics) RecordTranslationFailure()

RecordTranslationFailure records a failed configuration translation.

func (*CtrlFuncMetrics) RecordTranslationSuccess added in v2.9.0

func (c *CtrlFuncMetrics) RecordTranslationSuccess()

RecordTranslationSuccess records a successful configuration translation.

type Protocol added in v2.9.0

type Protocol string

Jump to

Keyboard shortcuts

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