metrics

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 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 (
	// InventoryStatusSuccess workflow has completed successfully
	InventoryStatusSuccess = "Success"
	// InventoryStatusFailed workflow activity execution has failed
	InventoryStatusFailed = "Failed"

	// Inventory operation types for metrics labels
	InventoryOperationTypeCreate = "create"
	InventoryOperationTypeDelete = "delete"
)
View Source
const (
	MetricsNamespace = "cloud_workflow"
)

Variables

This section is empty.

Functions

func NewCoreMetrics

func NewCoreMetrics(reg prometheus.Registerer) *coreMetrics

NewCoreMetrics creates a new coreMetrics struct and registers the metrics with the provided registerer

Types

type InventoryObjectLifecycleEvent

type InventoryObjectLifecycleEvent struct {
	ObjectID uuid.UUID
	Created  *time.Time // Non-nil for CREATE events, nil for DELETE events
	Deleted  *time.Time // Non-nil for DELETE events, nil for CREATE events
}

InventoryObjectLifecycleEvent represents a lifecycle event for an inventory object. Either Created or Deleted should be set, but not both: - For CREATE events: Created should be non-nil, Deleted should be nil - For DELETE events: Deleted should be non-nil, Created should be nil

type ManageInventoryMetrics

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

ManageInventoryMetrics is a wrapper for managing inventory metrics activities

func NewManageInventoryMetrics

func NewManageInventoryMetrics(reg prometheus.Registerer, dbSession *cdb.Session) ManageInventoryMetrics

InitInventoryMetrics initializes inventory activity metrics

func (*ManageInventoryMetrics) RecordLatency

func (mim *ManageInventoryMetrics) RecordLatency(ctx context.Context, siteID uuid.UUID, activity string, isFailed bool, duration time.Duration) error

RecordLatency is a Temporal activity that records the latency of inventory processing activities

Jump to

Keyboard shortcuts

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