 Documentation
      ¶
      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" MetricNameTranslationCount = "ingress_controller_translation_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 is a Prometheus metric with semantics defined by its help string in NewCtrlFuncMetrics().
	ConfigPushCount *prometheus.CounterVec
	// TranslationCount is a Prometheus metric with semantics defined by its help string in NewCtrlFuncMetrics().
	TranslationCount *prometheus.CounterVec
	// ConfigPushDuration is a Prometheus metric with semantics defined by its help string in NewCtrlFuncMetrics().
	ConfigPushDuration *prometheus.HistogramVec
}
    func NewCtrlFuncMetrics ¶
func NewCtrlFuncMetrics() *CtrlFuncMetrics
func (*CtrlFuncMetrics) RecordPushFailure ¶ added in v2.9.0
func (c *CtrlFuncMetrics) RecordPushFailure(p Protocol, d time.Duration, dataplane string, 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) 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.
 Click to show internal directories. 
   Click to hide internal directories.