metrics

package
v1.35.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricsNamespace          = "playbooks_plugin"
	MetricsSubsystemPlaybooks = "playbooks"
	MetricsSubsystemRuns      = "runs"
	MetricsSubsystemSystem    = "system"

	MetricsCloudInstallationLabel = "installationId"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorLoggerWrapper

type ErrorLoggerWrapper struct {
}

func (*ErrorLoggerWrapper) Println

func (el *ErrorLoggerWrapper) Println(v ...interface{})

type InstanceInfo

type InstanceInfo struct {
	Version        string
	InstallationID string
}

type Metrics

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

Metrics used to instrumentate metrics in prometheus.

func NewMetrics

func NewMetrics(info InstanceInfo) *Metrics

NewMetrics Factory method to create a new metrics collector.

func (*Metrics) IncrementErrorsCount

func (m *Metrics) IncrementErrorsCount(num int)

func (*Metrics) IncrementPlaybookArchivedCount

func (m *Metrics) IncrementPlaybookArchivedCount(num int)

func (*Metrics) IncrementPlaybookCreatedCount

func (m *Metrics) IncrementPlaybookCreatedCount(num int)

func (*Metrics) IncrementPlaybookRestoredCount

func (m *Metrics) IncrementPlaybookRestoredCount(num int)

func (*Metrics) IncrementRunsCreatedCount

func (m *Metrics) IncrementRunsCreatedCount(num int)

func (*Metrics) IncrementRunsFinishedCount

func (m *Metrics) IncrementRunsFinishedCount(num int)

func (*Metrics) ObserveFollowersActiveTotal

func (m *Metrics) ObserveFollowersActiveTotal(count int64)

func (*Metrics) ObserveParticipantsActiveTotal

func (m *Metrics) ObserveParticipantsActiveTotal(count int64)

func (*Metrics) ObservePlaybooksActiveTotal

func (m *Metrics) ObservePlaybooksActiveTotal(count int64)

func (*Metrics) ObserveRemindersOutstandingTotal

func (m *Metrics) ObserveRemindersOutstandingTotal(count int64)

func (*Metrics) ObserveRetrosOutstandingTotal

func (m *Metrics) ObserveRetrosOutstandingTotal(count int64)

func (*Metrics) ObserveRunsActiveTotal

func (m *Metrics) ObserveRunsActiveTotal(count int64)

type Service

type Service struct {
	*http.Server
}

Service prometheus to run the server.

func NewMetricsServer

func NewMetricsServer(address string, metricsService *Metrics) *Service

NewMetricsServer factory method to create a new prometheus server.

func (*Service) Run

func (h *Service) Run() error

Run will start the prometheus server.

func (*Service) Shutdown

func (h *Service) Shutdown() error

Shutdown will shutdown the prometheus server.

Jump to

Keyboard shortcuts

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