metrics

package
v0.0.0-...-ea6e92e Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// UserSignupUniqueTotal is incremented only the first time a user signup is created, there is 1 for each unique user
	UserSignupUniqueTotal prometheus.Counter

	// UserSignupApprovedTotal is incremented each time a user signup is approved, can be multiple times per user if they reactivate multiple times
	UserSignupApprovedTotal prometheus.Counter

	// UserSignupApprovedWithMethodTotal is incremented each time a user signup is approved and includes either 'automatic' or 'manual' labels, can be multiple times per user if they reactivate multiple times
	UserSignupApprovedWithMethodTotal *prometheus.CounterVec

	// UserSignupBannedTotal is incremented each time a user signup is banned
	UserSignupBannedTotal prometheus.Counter

	// UserSignupDeactivatedTotal is incremented each time a user signup is deactivated, can be multiple times per user if they reactivate multiple times
	UserSignupDeactivatedTotal prometheus.Counter

	// UserSignupAutoDeactivatedTotal is incremented each time a user signup is automatically deactivated, can be multiple times per user if they reactivate multiple times
	UserSignupAutoDeactivatedTotal prometheus.Counter

	// UserSignupDeletedWithInitiatingVerificationTotal is incremented each time a user signup is deleted due to verification time trial expired, and verification was initiated
	UserSignupDeletedWithInitiatingVerificationTotal prometheus.Counter

	// UserSignupDeletedWithoutInitiatingVerificationTotal is incremented each time a user signup is deleted due to verification time trial expired, and verification was NOT initiated
	UserSignupDeletedWithoutInitiatingVerificationTotal prometheus.Counter

	// UserSignupVerificationRequiredTotal is incremented only the first time a user signup requires verification, can be multiple times per user if they reactivate multiple times
	UserSignupVerificationRequiredTotal prometheus.Counter
)

counters

View Source
var (
	// SpaceGaugeVec reflects the current number of spaces in the system, with a label to partition per member cluster
	SpaceGaugeVec *prometheus.GaugeVec
	// UserSignupsPerActivationAndDomainGaugeVec reflects the number of users labelled with on their current number of activations and email address domain
	UserSignupsPerActivationAndDomainGaugeVec *prometheus.GaugeVec
	// MasterUserRecordGaugeVec reflects the current number of MasterUserRecords, labelled with their email address domain (`internal` vs `external`)
	MasterUserRecordGaugeVec *prometheus.GaugeVec
	// HostOperatorVersionGaugeVec reflects the current version of the host-operator (via the `version` label)
	HostOperatorVersionGaugeVec *prometheus.GaugeVec
)

gauge with labels

Functions

func RegisterCustomMetrics

func RegisterCustomMetrics()

RegisterCustomMetrics registers the custom metrics

func Reset

func Reset()

Reset resets all metrics. For testing purpose only!

Types

type Domain

type Domain string
const External Domain = "external"
const Internal Domain = "internal"

func GetEmailDomain

func GetEmailDomain(obj RuntimeObject) Domain

GetEmailDomain retrieves the email address for the given object returns the associated domain (`Internal` or `External`) Note: if given email address is empty (ie, it does not exist - which should not happen), then an error is logged and the returned domain is `external`

type RuntimeObject

type RuntimeObject interface {
	GetAnnotations() map[string]string
	GetName() string
	GetObjectKind() schema.ObjectKind
}

Jump to

Keyboard shortcuts

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