Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildJobMetricsName ¶
BuildJobMetricsName returns the standardized PushGateway job name for an agent job binary. All agent binaries must use this function to ensure the job name is consistent across deployments.
Example: BuildJobMetricsName("claude-agent") → "agent_job_claude_agent"
Types ¶
type JobMetrics ¶
type JobMetrics interface {
// RecordRun atomically increments the run counter and sets the last-run
// gauge for the given status label. Both operations use the same label
// value; they cannot drift.
RecordRun(status agentlib.AgentStatus)
// RecordDuration observes the run duration histogram.
RecordDuration(d time.Duration)
}
JobMetrics records per-job Prometheus metrics at the result-publish boundary.
func NewJobMetrics ¶
func NewJobMetrics( registry *prometheus.Registry, currentDateTime libtime.CurrentDateTime, ) JobMetrics
NewJobMetrics creates a JobMetrics that registers three collectors onto the caller-owned registry. The caller must NOT pass nil for registry. Registration failures (e.g. duplicate registration) panic — they are programmer errors caught at startup.
Click to show internal directories.
Click to hide internal directories.