Documentation ¶
Index ¶
Constants ¶
View Source
const ( MetricsNamespace = "redhat_appstudio" MetricsSubsystem = "buildservice" )
Variables ¶
View Source
var ( HistogramBuckets = []float64{5, 10, 15, 20, 30, 60, 120, 300} ComponentOnboardingTimeMetric = prometheus.NewHistogram(prometheus.HistogramOpts{ Namespace: MetricsNamespace, Subsystem: MetricsSubsystem, Buckets: HistogramBuckets, Name: "component_onboarding_time", Help: "The time in seconds spent from the moment of Component creation PaC provision.", }) PipelinesAsCodeComponentProvisionTimeMetric = prometheus.NewHistogram(prometheus.HistogramOpts{ Namespace: MetricsNamespace, Subsystem: MetricsSubsystem, Buckets: HistogramBuckets, Name: "PaC_configuration_time", Help: "The time in seconds spent from the moment of requesting PaC provision till Pipelines-as-Code configuration done in the Component source repository.", }) PipelinesAsCodeComponentUnconfigureTimeMetric = prometheus.NewHistogram(prometheus.HistogramOpts{ Namespace: MetricsNamespace, Subsystem: MetricsSubsystem, Buckets: HistogramBuckets, Name: "PaC_unconfiguration_time", Help: "The time in seconds spent from the moment of requesting PaC unprovision till Pipelines-as-Code configuration is removed in the Component source repository.", }) PushPipelineRebuildTriggerTimeMetric = prometheus.NewHistogram(prometheus.HistogramOpts{ Namespace: MetricsNamespace, Subsystem: MetricsSubsystem, Buckets: HistogramBuckets, Name: "Push_pipeline_rebuild_trigger_time", Help: "The time in seconds spent from the moment of requesting push pipeline rebuild till Pipelines-as-Code API trigger.", }) ComponentTimesForMetrics = map[string]ComponentMetricsInfo{} )
Functions ¶
This section is empty.
Types ¶
type AvailabilityProbe ¶
type AvailabilityProbe interface { CheckAvailability(ctx context.Context) bool AvailabilityGauge() prometheus.Gauge }
AvailabilityProbe represents a probe that checks the availability of a certain aspects of the service
type BuildMetrics ¶
type BuildMetrics struct {
// contains filtered or unexported fields
}
BuildMetrics represents a collection of metrics to be registered on a Prometheus metrics registry for a build service.
func NewBuildMetrics ¶
func NewBuildMetrics(probes []AvailabilityProbe) *BuildMetrics
func (*BuildMetrics) InitMetrics ¶
func (m *BuildMetrics) InitMetrics(registerer prometheus.Registerer) error
func (*BuildMetrics) StartAvailabilityProbes ¶
func (m *BuildMetrics) StartAvailabilityProbes(ctx context.Context)
type ComponentMetricsInfo ¶
type GithubAppAvailabilityProbe ¶
type GithubAppAvailabilityProbe struct {
// contains filtered or unexported fields
}
func NewGithubAppAvailabilityProbe ¶
func NewGithubAppAvailabilityProbe(client client.Client) *GithubAppAvailabilityProbe
func (*GithubAppAvailabilityProbe) AvailabilityGauge ¶
func (g *GithubAppAvailabilityProbe) AvailabilityGauge() prometheus.Gauge
func (*GithubAppAvailabilityProbe) CheckAvailability ¶
func (g *GithubAppAvailabilityProbe) CheckAvailability(ctx context.Context) bool
Click to show internal directories.
Click to hide internal directories.