metrics

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

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