localmetrics

package
v0.0.0-...-a0d0389 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricsCollector

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

MetricsCollector is a struct describing a Prometheus collector

var (

	// Collector is a pointer to the MetricsCollector struct describing a Prometheus collector
	Collector *MetricsCollector
)

func NewMetricsCollector

func NewMetricsCollector(store cache.Cache) *MetricsCollector

NewMetricsCollector creates a new instance of a Prometheus metrics collector

func (*MetricsCollector) AddAPICall

func (c *MetricsCollector) AddAPICall(controller string, req *http.Request, resp *http.Response, duration float64, err error)

AddAPICall observes metrics for a call to an external API - param controller: The name of the controller making the API call - param req: The HTTP Request structure - param resp: The HTTP Response structure - param duration: The number of seconds the call took.

func (*MetricsCollector) AddAccountReuseCleanupFailure

func (c *MetricsCollector) AddAccountReuseCleanupFailure()

AddAccountReuseCleanupFailure describes the number of accounts that have failed reuse

func (*MetricsCollector) Collect

func (c *MetricsCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (*MetricsCollector) Describe

func (c *MetricsCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface.

func (*MetricsCollector) SetAccountClaimPendingDuration

func (c *MetricsCollector) SetAccountClaimPendingDuration(ccs bool, duration float64)

SetAccountClaimPendingDuration sets the metric describing the time an accountClaim spends into the Pending state

func (*MetricsCollector) SetAccountClaimReadyDuration

func (c *MetricsCollector) SetAccountClaimReadyDuration(ccs bool, duration float64)

SetAccountClaimReadyDuration sets the metric describing the time it takes for an accountClaim to go into the Ready state

func (*MetricsCollector) SetAccountReadyDuration

func (c *MetricsCollector) SetAccountReadyDuration(ccs bool, duration float64)

SetAccountReadyDuration sets the metric describing the time it takes for an account to go into the Ready state

func (*MetricsCollector) SetAccountReusedCleanupDuration

func (c *MetricsCollector) SetAccountReusedCleanupDuration(duration float64)

SetAccountReusedCleanupDuration sets the metric describing the time it takes for an account to complete the reuse process

func (*MetricsCollector) SetReconcileDuration

func (c *MetricsCollector) SetReconcileDuration(controller string, duration float64, err error)

SetReconcileDuration describes the time it takes for the operator to complete a single reconcile loop

func (*MetricsCollector) SetTotalAWSAccounts

func (c *MetricsCollector) SetTotalAWSAccounts(total int)

SetTotalAWSAccounts sets the metric watching the total number of AWS accounts known by the operator

type ReportedError

type ReportedError struct {
	Source string
	Code   string
}

func (*ReportedError) Parse

func (e *ReportedError) Parse(err error)

Jump to

Keyboard shortcuts

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