observability

package
v0.0.7-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: AGPL-3.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ComputeEntitlementsIssuedMetricName    = "stackdome_cloud_compute_entitlements_issued"
	ComputeEntitlementsExpiredMetricName   = "stackdome_cloud_compute_entitlements_expired"
	SharedComputeLeasesMetricName          = "stackdome_cloud_shared_compute_leases"
	SharedComputeCapacityLimitMetricName   = "stackdome_cloud_shared_compute_capacity_limit"
	ComputeAccessSnapshotSuccessMetricName = "stackdome_cloud_compute_access_snapshot_collection_success"

	LabelSource = "source"

	UnknownSource = "Unknown"
)
View Source
const (
	HTTPRequestsMetricName = "stackdome_http_server_requests_total"
	HTTPDurationMetricName = "stackdome_http_server_request_duration_seconds"
	HTTPInFlightMetricName = "stackdome_http_server_in_flight_requests"

	LabelMethod      = "method"
	LabelRoute       = "route"
	LabelStatus      = "status"
	LabelStatusClass = "status_class"
	LabelWorker      = "worker"
	LabelResult      = "result"

	UnmatchedRoute = "unmatched"
	UnknownMethod  = "UNKNOWN"

	WorkerResultSuccess = "success"
	WorkerResultError   = "error"
	WorkerResultRequeue = "requeue"
	WorkerResultPanic   = "panic"
)
View Source
const (
	StacksMetricName               = "stackdome_stacks"
	StackResourcesMetricName       = "stackdome_stack_resources"
	StackFailuresMetricName        = "stackdome_stack_failures"
	StackSnapshotSuccessMetricName = "stackdome_stack_snapshot_collection_success"

	LabelState = "state"
	LabelType  = "type"

	UnknownState = "Unknown"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ComputeAccessMetricSnapshot

type ComputeAccessMetricSnapshot struct {
	EntitlementsBySource map[string]ComputeEntitlementMetricCounts
	LeaseStates          map[string]int64
}

type ComputeAccessSnapshotSource

type ComputeAccessSnapshotSource interface {
	Snapshot(context.Context) (ComputeAccessMetricSnapshot, error)
}

func NewDatabaseComputeAccessSnapshotSource

func NewDatabaseComputeAccessSnapshotSource(session db.SessionFactory) ComputeAccessSnapshotSource

type ComputeAccessSnapshotSourceFunc

type ComputeAccessSnapshotSourceFunc func(context.Context) (ComputeAccessMetricSnapshot, error)

func (ComputeAccessSnapshotSourceFunc) Snapshot

type ComputeEntitlementMetricCounts

type ComputeEntitlementMetricCounts struct {
	Issued  int64
	Expired int64
}

type Metrics

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

func NewMetrics

func NewMetrics() *Metrics

func (*Metrics) DecHTTPInFlight

func (m *Metrics) DecHTTPInFlight(method string)

func (*Metrics) Gatherer

func (m *Metrics) Gatherer() prometheus.Gatherer

func (*Metrics) Handler

func (m *Metrics) Handler() http.Handler

func (*Metrics) IncHTTPInFlight

func (m *Metrics) IncHTTPInFlight(method string)

func (*Metrics) ObserveHTTPRequest

func (m *Metrics) ObserveHTTPRequest(method, route string, status int, elapsed time.Duration)

func (*Metrics) ObserveWorkerExecution

func (m *Metrics) ObserveWorkerExecution(worker, result string)

func (*Metrics) RegisterComputeAccessCollector

func (m *Metrics) RegisterComputeAccessCollector(source ComputeAccessSnapshotSource, capacityLimit int)

func (*Metrics) RegisterStackCollector

func (m *Metrics) RegisterStackCollector(source StackSnapshotSource)

type StackMetricSnapshot

type StackMetricSnapshot struct {
	StackStates    map[string]int64
	ResourceStates map[string]int64
	FailureTypes   map[string]int64
}

type StackSnapshotSource

type StackSnapshotSource interface {
	Snapshot(context.Context) (StackMetricSnapshot, error)
}

func NewDatabaseStackSnapshotSource

func NewDatabaseStackSnapshotSource(session db.SessionFactory) StackSnapshotSource

type StackSnapshotSourceFunc

type StackSnapshotSourceFunc func(context.Context) (StackMetricSnapshot, error)

func (StackSnapshotSourceFunc) Snapshot

Jump to

Keyboard shortcuts

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