Documentation
¶
Overview ¶
Package monitoring publishes CortexOps custom metrics to AWS CloudWatch.
Metrics are published under the "CortexOps" namespace after each observe → reason → record cycle. When running locally without AWS credentials, all publish calls silently no-op.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CycleMetrics ¶
type CycleMetrics struct {
CycleSuccess bool // true if cycle completed and recorded a decision
CPUPercent float64 // cluster CPU % from MCP snapshot
ActiveQueries int // active query count from MCP snapshot
Confidence float64 // AI decision confidence (0.0–1.0)
ActionType string // e.g. "backup", "no_action", "scale_up"
}
CycleMetrics holds the telemetry data collected from one observe cycle.
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
Monitor wraps the CloudWatch client for metric publishing.
func NewMonitor ¶
NewMonitor creates a CloudWatch monitor. If AWS credentials are not available (e.g. local dev), it returns a no-op monitor that logs metrics locally instead of publishing to CloudWatch.
func (*Monitor) PublishCycleMetrics ¶
func (m *Monitor) PublishCycleMetrics(ctx context.Context, metrics CycleMetrics)
PublishCycleMetrics sends custom metrics to CloudWatch after each cycle. If CloudWatch is unavailable, metrics are logged to stdout instead.