metrics

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IncRequestsTotal

func IncRequestsTotal(requestIdentifier string, scopeMatched bool)

func ObserveReconciliationDuration

func ObserveReconciliationDuration(controllerType, result string, duration float64)

func RecordReconciliationDurationFunc

func RecordReconciliationDurationFunc(controllerType string, startTime time.Time)

Types

type OctopusMetricsCollector

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

OctopusMetricsCollector implements the prometheus.Collector interface to provide up-to-date metrics when Prometheus scrapes the endpoint.

func NewOctopusMetricsCollector

func NewOctopusMetricsCollector(cli client.Client, eng rules.Engine) *OctopusMetricsCollector

NewOctopusMetricsCollector creates a new instance of OctopusMetricsCollector

func (*OctopusMetricsCollector) Collect

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

Collect implements the prometheus.Collector interface It is called by Prometheus when it scrapes the metrics endpoint This method collects current metrics and sends them to the provided channel

func (*OctopusMetricsCollector) Describe

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

Describe implements the prometheus.Collector interface It sends the descriptors of all the metrics the collector will provide

func (*OctopusMetricsCollector) TrackRequest

func (c *OctopusMetricsCollector) TrackRequest(controllerType string, scopeMatched bool)

Jump to

Keyboard shortcuts

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